Green Acorn

Category Archives: Web Development

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

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

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

Posted in: PHP, Web Development

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:

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

Set up virtual hosts with XAMPP

Today I am going to show you how to set up Virtual Hosts using XAMPP on a Mac. Using Virtual hosts is a great tool for any website designer during the development stages. The first stage is to edit your hosts file which is stored in the “etc” directory. Quickest and easiest way to do this is by using the terminal. I personally use iTerm – but the default terminal will do the same job.

Read more

Posted in: Web Development