ActiveState Community

Unable To Load Xdebug

Posted by aclittle on 2009-11-01 20:07

New to PHP, using PHP 5.0.51, Komodo 5.2, IIS 7.0. I was unable to configure the Komodo debugger, got the "unable to load debugger extension message". PHP -i returns the "failed loading xdebug.dll" - assume this is the same issue. I am using fast-cgi, with IIS, not sure which PHP executable to use for the debugger - php.exe, php-win.exe, or php-cgi.exe - believe I have tried them all with same result. Thanks for your help.

ericp | Mon, 2009-11-02 11:17

You are correct -- the message from `php -i` is caused by the same
problem that triggers the Komodo error message. Here's why...

PHP debugging relies on a third-party DLL, php_xdebug.dll. Because it
relies on PHP internals, you need to make sure you match up the version
of php_xdebug.dll with the version of php.exe (or php-cgi.exe; I wouldn't
try debugging php-win.exe, as it doesn't write to stdout or stderr, so if
there are problems while debugging it, you won't see error messages.

Now, matching up php.exe and php_xdebug.dll by version # on Windows isn't
sufficient -- you need to know how they're built:

* are they thread-safe or not?

* built for a 32-bit or 64-bit system?

* built with VC6 or VC9?

Until version 5.3, PHP only gave info on the first point. With
5.3, we can now get all the above information out of PHP, and so
we're now shipping six variants of php_xdebug.dll (VC6 doesn't do
64-bit builds), and the wizard can match up the correct versions.

This leaves you with two options:

1. Upgrade to PHP 5.3, and let Komodo select the appropriate DLL.

2. Determine what kind of PHP 5.0 you're running, and download the
correct DLL manually.

Hope this helps,
Eric