It always the simplest thing!

I’ve been trying for MONTHS to get the very excellent XDebug PHP extension, written and maintained the PHP Jedi Master, Derick Rethans. XDebug offers some serious debugging capabilities to PHP that are second to none. It also offers some excellent profiling tools, which I should really make better use of in development. It’s easy to see why I was so desperate to get it working.

For months, whenever I would enable the extension in my php.ini file, every time I tried to load a page (after restarting Apache, of course), Apache would crash, displaying a blank page, or a partial page at best. This is obviously not ideal. This morning while installing NetBeans IDE, since Aptana Studio has dropped what was once great PHP support to now mediocre tool set, I noticed they had a walk through for configuring Apache and PHP, with XDebug, on their site, so I thought I would take a read through it.

One thing jumped out at me while I was reading the Apache installation instructions and that was to not install it in the default location (C:\Program Files) because everything in that directory was write protected. That lead me to check the permissions on the XDebug DLL. When I did, I noticed there was a button in the Properties sheet with “Unblock” written on it, so I clicked it. I then went to my php.ini and re-enabled XDebug and restarted Apache. I checked my phpinfo sheet to make sure it was loading. Check. Then I loaded up a page I was working on that I knew had an error message on it and sure enough I got to see the beautiful error message that XDebug displays.

After all this time confused as to why XDebug would crash Apache when I knew other people had to be using it, all I had to do was click the unblock button so Vista would allow the DLL to actually run! So annoying!

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: