简体   繁体   中英

XDebug not loading on Windows 7 64 bit PHP 5.4

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

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

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/

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

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"

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

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"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM