XDebug 无法在 Windows 7 上加载 64 位 PHP 5.4

2022-08-30 19:20:12

我有php在apache上运行。我已经下载了我认为是正确的xdebug编译的dll,用于php版本5.4 64位窗口。我启用了线程安全,并且它使用的是VC9。我已经下载了dll并将其放在这里:

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

这是我在php.ini中的内容:

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

当我启动Apache时,我收到这个错误:

[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

答案 1

为了确保您已经下载了正确的二进制文件,您可以使用向导 http://xdebug.org/wizard.php 它会确切地告诉您要下载哪个文件以及您应该将zend_extension行放入哪个php.ini文件中(当然,您现在正在使用正确的二进制文件,因为您会收到“无法加载”错误)。


答案 2

好吧,它现在正在工作,我想我知道出了什么问题。我使用的是64位版本的PHP,但32位版本的Apache和64位版本的xdebug。我重新开始并使用Apache 2.4 32位,因为php5模块似乎没有64位版本。所以,我确保我有32位版本的所有东西。我正在使用php5.4与VC9,线程安全。

这篇博客文章帮助设置了它:http://lifeofageekadmin.com/how-install-apache-2-4-php-5-4-and-mysql-5-5-21-on-windows-7/


推荐