XDebug not loading on Windows 7 64 bit PHP 5.4

I finally got this to work. Following the directions on the xdebug website, I used the wizard and downloaded the dll file to the 'ext' directory. The wizard then told me to add this line to my php.ini file: zend_extension=ext\php_xdebug-2.3.3-5.6-vc11.dll

This gave me the error seen above: Failed loading ext\php_xdebug-2.3.3-5.6-vc11.dll

I also tried replacing the backwards slash with a forward slash, but this failed with the message: Failed loading ext\ext/php_xdebug-2.3.3-5.6-vc11.dll

Looking at that last message, I thought maybe the extension directory was causing issues, and I saw that in my php.ini file was this line: extension_dir = "ext"

So I changed to using: zend_extension=php_xdebug-2.3.3-5.6-vc11.dll And it worked!!


In order to make sure that you've downloaded the correct binary, you can use the wizard at http://xdebug.org/wizard.php It will tell you exactly which file to download and in which php.ini file you should put the zend_extension line (you're using the correct one now of course, as you get the "Failed to load" error).


in latest version of xampp you only need to add zend_extension=xdebug to php.ini, for example:

zend_extension=xdebug
[XDebug]
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "c:\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.trace_output_dir = "c:\xampp\php"
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_connect_back=on
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey="PHPSTORM"

OK, it is working now and I think I know what was wrong. I was using the 64 bit version of PHP but the 32 bit version of Apache and the 64 bit version of xdebug. I started over and used Apache 2.4 32 bit, since there doesn't seem to be a 64 bit version with the php5 module. So, I made sure I have the 32 bit version of everything. I am using php5.4 with VC9, Thread Safe.

This blog post helped in setting it up: http://lifeofageekadmin.com/how-install-apache-2-4-php-5-4-and-mysql-5-5-21-on-windows-7/

Tags:

Php

Xdebug