Here’s a nice easy solution to a schoolboy error I hit this morning…

I decided to upgrade my copy of PhpED up to the latest edition – 7.0, build 7027. I was previously on build 7023, so there weren’t that many changes – but being a perfectionist, I wanted the latest version.

One of the changes was that there is a point upgrade to the Debugger in PhpED. So, I installed the latest version, and received the following error message;

I searched the NuSphere PhpED website for any clues to this – but there wasn’t anything on that site. A general Google search didn’t raise anything either. Eventually a lonely neuron at the back of my brain forced its way to the front and gave me the solution.

I had forgotten to restart the Apache service on the server! A quick service apache2 restart command, and I was (almost) back in business.

Only almost. When I retested my debugger settings in PhpEd, I got a different error;


This time it seemed to be telling me that I had to edit my php.ini file in order to allow debugging. But that can’t be right, as I’d had debugging working on this server less than an hour before…

The clue is on the second line down in the image; it mentioned the x86_64 directory. I had accidentally copied the dbg-php-5.3.so file from the x86 folder instead of the x86_64 folder. My Ubuntu server runs a 64-bit operating system.

Copying the correct dbg-php-5.3.so file into the /usr/lib/php5/20090626 folder, and then restarting the server, gave me a good completion on the debug tests, and I’m now able to debug my PHP files again.

Upgrading the debugger

This is a correct list of instructions on how to update the PHP debugger. It’s mainly for my reference, and is specific to an Ubuntu server – but if it helps you, please let me know.

1. Locate the file dbg-4.6.2-Linux.tar.gz in the folder c:\Program Files (x86)\NuSphere\PhpED\debugger\server

2. FTP that file to your server folder /usr/lib/php5/20090626

3. Extract the tarball using the following command

$ tar -zxvf dbg-4.6.2-Linux.tar.gz

This will create a folder called dbg-4.6.2-Linux. Run the following commands to extract the correct PHP extension;

$ cd dbg-4.6.2-Linux/x86_64
$ cp dbg-php-5.3.so ../../dbg-php-5.3.so
$ service apache2 restart

This makes a lot of assumptions, of course! But it should be a good enough guide for most developers to work from.