XDebug not loading on Windows 7 64 bit PHP 5.4

Go To StackoverFlow.com

17

I have php running on apache. I have downloaded what I think to be the correct xdebug compiled dll for php version 5.4 64 bit windows. I have thread saftey enabled and it is using VC9. I have downloaded the dll and placed it here:

C:\php5\extras\php_xdebug-2.2.0RC1-5.4-vc9-x86_64.dll

Here is what I have in my php.ini:

[xdebug]
zend_extension = "C:\php5\extras\php_xdebug-2.2.0RC1-5.4-vc9-x86_64.dll"

When I start Apache, I get this error:

[Wed Apr 04 17:01:56 2012] [notice] Parent: Received restart signal -- Restarting the server.
Failed loading C:\php5\extras\php_xdebug-2.2.0RC1-5.4-vc9-x86_64.dll
hild process is ending.
[Wed Apr 04 17:01:56 2012] [notice] Apache/2.2.22 (Win32) PHP/5.4.0 configured -- resuming normal operations
[Wed Apr 04 17:01:56 2012] [notice] Server built: Jan 28 2012 11:16:39
[Wed Apr 04 17:01:56 2012] [notice] Parent: Created child process 2120
[Wed Apr 04 17:01:57 2012] [notice] Child 2120: Child process is running
[Wed Apr 04 17:01:57 2012] [notice] Child 2120: Acquired the start mutex.
[Wed Apr 04 17:01:57 2012] [notice] Child 2120: Starting 64 worker threads.
[Wed Apr 04 17:01:57 2012] [notice] Child 5624: Released the start mutex
[Wed Apr 04 17:01:58 2012] [notice] Child 5624: All worker threads have exited.
[Wed Apr 04 17:01:58 2012] [notice] Child 5624: Child process is exiting
Failed loading C:\php5\extras\php_xdebug-2.2.0RC1-5.4-vc9-x86_64.dll
2012-04-04 22:08
by Jon Hargett


18

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/

2012-04-05 18:53
by Jon Hargett
...and make sure you use the right version "Thread Safe" [ts] OR "None Thread Safe" [nts - b3wii 2018-09-03 12:26


52

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).

2012-04-05 08:54
by Derick
For some reason, the wizard didn't work when I tried this. It is still not working actually. I went to my phpinfo.php page on my localhost, hit CTRL+A and then CTRL+C and pasted the results in to the wizard. It spit out some information, but it wasn't complete. It then said "Could not find any useful information. - Jon Hargett 2012-04-05 13:41
Indeed, I've just updated it. Check if it works now - Derick 2012-04-06 10:50
Sorry, no, it is still not working - Jon Hargett 2012-04-08 01:56
A note about the Xdebug wizard: I'm running PHP 5.4.14 on Windows 7 and their wizard site told me to simply add the line zend_extension = C:\PHP\ext. But to get it to work, I had to define the actual file path, like in the example for this question, and not just the directory it's in.

Also, there are definitely more lines you'll need to add to php.ini to get it to work. Follow this guide and you're golden - Spencer Williams 2013-05-10 01:23

Wizard is not working for m - Ruwantha 2013-09-29 13:47
@Derick Thanks for that link. Great tool - W3bGuy 2016-04-07 22:00


12

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!!

2015-08-05 18:32
by Chris
Thanks, this is the fix I needed for Windows 10 - Patrick Kenny 2017-09-29 06:43
Thanks! Works for me. Php 7.2, Xdebug 2.6, Windows 10 - paibamboo 2018-06-08 08:07
Your answer has pushed me to investigate better. In my case the problem was the wrong dll version, even if my system is Windows 10-64, it pretends the xdebug to be 32, probably I have 32 bit xampp install (or php, I have still to check that) Thanks - ManuelJE 2018-10-15 09:09


4

OK, I know that this is a really old zombie thread, but having run through this problem myself recently, it turns out to have a trivial solution.

PHP.INI requires the use of forwards slashes for directories, whereas the instructions given for installing XDebug under windows uses backslashes. SO for the above original problem, the solution is to change the zend_extension line to read:

zend_extension = "C:/php5/extras/php_xdebug-2.2.0RC1-5.4-vc9-x86_64.dll"

Hope this helps.

2015-02-24 21:01
by Dave S.
This does not appear to be true. Here is my ini entry:zendextension = "C:\development\languages\php5517tsx86\ext\phpxdebug-2.2.5-5.5-vc11.dll" and it works - Jon Hargett 2015-02-26 18:53
I too have backslashes and everything works, my problem was that I had x86 PHP on a x64 system and mistakenly used x64 Xdebug dll. Helps checking phpinfo(); output by yourself and choosing x86/x64 and TS/NT - kit 2016-09-16 09:37
I have backslashes and that works for me but not for my colleague. Forward-slash doesn't work for her either.. - Tech 2016-09-23 12:58
This works for me, thanks - Mustapha Hadid 2017-08-24 12:22


3

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"
2018-07-10 08:15
by DolDurma
This assumes the dll file name is php_xdebug.dllmichiruf 2018-12-01 16:43


1

Take a look in C:\php5\ext and see if php_xdebug.dll is in there already. If not, try renaming php_xdebug-2.2.0RC1-5.4-vc9-x86_64.dll to php_xdebug.dll and placing it in C:\php5\ext, then change your php.ini addition to:

[xdebug]
zend_extension = "C:\php5\ext\php_xdebug.dll"
2012-04-04 23:55
by Xenon
php_debug.dll was not in there. I did as you sugested and still got the error - Jon Hargett 2012-04-05 01:06
Well, it was worth a try. The only other suggestion I can make is that you try running PHP 5.3 using the Xdebug binary here: http://downloads.php.net/pierre - Xenon 2012-04-05 03:25


0

Had the same issue. For me, I needed the absolute path for zend_extension, in quotes (but backslashes are fine).

2016-01-09 19:31
by felixfbecker


0

I have Windows 7 64bit and php v5.4.4, but version of x-debug that i need to download is :

PHP 5.4 VC9 (32 bit) (MD5: ffeb0215621d330fa53b249f0930ffae)

because IIS can't work with xdebug 64bit

also my php.ini instructions :

[Xdebug]
zend_extension="C:\Program Files (x86)\iis express\PHP\v5.4\ext\php_xdebug-2.4.0rc4-5.4-vc9-nts.dll"
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.profiler_enable=1
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "C:\temp\php"
xdebug.profiler_output_dir="C:\temp\php"
2016-02-10 19:00
by Lev K.
Ads