Green Acorn

Blog

PHP’s register_shutdown_function

With any PHP application, fatal errors will occur. Instead of presenting the user a white screen of death, it’s possible to programmatically execute a function just before a PHP completely shutsdown using the PHP function register_shutdown_function. Read more

Author:
Posted in: PHP, Web Development

PHP Error Reporting & Logging

In PHP there are two options that control what errors are reported and whether these errors are shown to the user. Error reporting sets the error reporting level with an assigned integer, typically via a constant. By default, PHP reports everything except E_NOTICE and E_STRICT prior to PHP 5.4. Read more

Author:
Posted in: PHP, Web Development

Getting started with Memcached & PHP

In this basic tutorial, I am going to show you how to install and get started with Memcached using PHP.
Memcached is used to improve a web applications performance by storing an associative array of data in its memory. This is typically used to store database query results, therefore reducing the amount of queries to the database server. Read more

Author:
Posted in: PHP, Web Development

Creating a Ruby SOAP Client

In a previous post, I created this web service in PHP (view the post here). In order to create a client in Ruby, I’ll need to install a Ruby Gem called Savon. Savon is a SOAP client library for Ruby and will allow me call the PHP based web service via Ruby code. Read more

Author:
Posted in: Ruby, Web Services

Working with PHP NuSOAP

In this tutorial, I am going to show you how easy it is to work with SOAP using the NuSOAP PHP library.
Firstly, download the NuSOAP library here:

http://sourceforge.net/projects/nusoap/

Once you have downloaded the library, unzip the contents and copy the lib folder into your web root. Read more

Useful Ruby on Rails Commands

1. Create a new Ruby On Rails application using the MySQL database adapter.

rails new ProjectName -d mysql

2. Dump current database schema into db/schema.rb. Migration tasks calls the below command after each run.

rake db:schema:dump

Read more

Export & Import a Database with CouchDB

A simple way of exporting a CouchDB database to a file, is by running the following Curl command in the terminal window:

curl -X GET http://127.0.0.1:5984/[mydatabase]/_all_docs\?include_docs\=true > /Users/[username]/Desktop/db.json

Read more

Author:
Posted in: CouchDB

Securing your app with Nginx Naxsi

After experimenting with Nginx, I decided to look into the available security modules. One module I seen mentioned a lot was Naxsi – a web application firewall for Nginx. Read more

Author:
Posted in: Nginx

Symfony2 Nginx Vhost Configuration

Recently I have been experimenting with Nginx and CouchDB. After managing to get them installed on my Ubuntu virtual machine, I wanted to checkout one of my Symfony2 projects and put Nginx to the test. Read more

Author:
Posted in: CouchDB, Nginx, Symfony

Symfony2 Email Helper

In this tutorial I am going to show you how to set up a basic helper class using the Symfony2 PHP framework. By default, Symfony2 doesn’t have a Helper directory in the bundle structure; however, this doesn’t stop us from making one by using Symfony’s built in service container.

Read more

Author:
Posted in: PHP, Symfony