A collection of articles and snippets I've collected over the years.

PHP Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0 Fix

July 2, 2010

When I upgraded my desktop to Ubuntu 10.04 (Lucid Lynx) I also upgraded my PHP version to 5.3. Apart from a few warnings with some deprecated functions (the main cuplrit being the ereg functions) all...

IDE Tip: Mouse-wheel on Netbeans tabbed pane

March 3, 2010

If you have a lot of files open and they don't all fit in the Netbeans tabbed pane you can scroll them left/right when using your mouse wheel when you move the mouse over the tabs.

Netbeans PHP Autocomplete stopped

February 25, 2010

I had an issue with Netbeans 6.8 where the auto-complete for PHP functions stopped working. It would work with functions and methods defined in my project but wouldn't auto-complete any native PHP...

CLI Autologin and autostart a program with Ubuntu 9.10 karmik

February 12, 2010

My old laptop is used as a music server and so I haven't installed a desktop on it. I use MPD as my music server and ncmpd as the front-end.  However, I'm finding it a pain to enter my username,...

Install Ubuntu from Grub over Network

January 8, 2010

I have an old Dell C400 Latitude at home and use it primarily as a music server.  It doesn't have any built in drives such as floppy or CD and I don't own an external Dell CD drive.  It won't boot...

Mashups and Music

January 6, 2010

On my old site I had a couple of tracks that I have mashed up in the past and one track created with fruityloops.  Since the blog has gone in these tracks have disappeared.  Time to put 'em back....

Correct VAT calculations in PHP

January 4, 2010

Due to the so called 'Credit Crunch' the British government had decided to change the VAT rate for one year between December 2008 and Jan 2010.  Many developers in the UK had made the mistake of...

Rename files in bash

December 19, 2009

If you ever need to rename a batch of files using a regex or similar you can use the <code>rename</code> command:

PHP number_format gotcha

December 19, 2009

Be careful when doing any kind of calculations with numbers that have been passed through PHP's number_format function as they can lead to unexpected results. The problems lie with the thousands...

Unicode PHP functions and files

November 4, 2009

This is nothing amazing, just a bit of fun.  One of the more useful features of the upcoming PHP6 is full unicode support throughout.  However, did you know that PHP supports unicode already and...

Set Fixed IP Address on Ubuntu

August 13, 2009

I often find that I need to fix an IP address using Ubuntu Server and then have to search for the correct format for /etc/network/interfaces.  For record, here it is:

Timesheet Prompt

July 31, 2009

A simple script to prompt for a Timesheet entry on Ubuntu

MySQL Stored Procedure tutorial

July 30, 2009

How to create and use a stored procedure in MySQL: To call this use the 'call' keyword and pass the parameters:

Share mouse and keyboard across computers

July 30, 2009

As a website developer I have a need to use multiple operating systems at the same time.  I have a laptop that dual boots Windows Vista and Ubuntu 9.04 and I use this to test websites in Internet...

A day in the life of Spinnaker Tower, Portsmouth

July 17, 2009

Please allow time for this to load. Size is 18mb.

Install PDFLib with PHP

July 9, 2009

To install the PDFLib functionality you need to do the following (on an Ubuntu box). Then install PDFLib using pecl: This will ask for the path to PDFlib headers. Select '1' and enter: Then...