XDebug没有在Windows 7 64位PHP 5.4上加载

Jon*_*ett 20 php xdebug

我在apache上运行php.我已经下载了我认为正确的xdebug编译的dll for php version 5.4 64 bit windows.我启用了线程安全,它使用的是VC9.我已经下载了dll并将其放在这里:

C:\php5\extras\php_xdebug-2.2.0RC1-5.4-vc9-x86_64.dll
Run Code Online (Sandbox Code Playgroud)

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

[xdebug]
zend_extension = "C:\php5\extras\php_xdebug-2.2.0RC1-5.4-vc9-x86_64.dll"
Run Code Online (Sandbox Code Playgroud)

当我启动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
Run Code Online (Sandbox Code Playgroud)

Der*_*ick 54

为了确保您已经下载了正确的二进制文件,您可以使用http://xdebug.org/wizard.php上的向导它将准确地告诉您要下载哪个文件以及您应该放在哪个php.ini文件中zend_extension行(当然,你正在使用正确的行,因为你得到了"加载失败"错误).


Jon*_*ett 19

好的,它现在正在工作,我想我知道出了什么问题.我使用的是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/


Chr*_*ris 13

我终于开始工作了.按照xdebug网站上的说明,我使用了向导并将dll文件下载到'ext'目录.然后该向导告诉我将此行添加到我的php.ini文件中:zend_extension=ext\php_xdebug-2.3.3-5.6-vc11.dll

这给了我上面看到的错误: Failed loading ext\php_xdebug-2.3.3-5.6-vc11.dll

我也尝试用正斜杠替换反向斜杠,但是这个消息失败了: Failed loading ext\ext/php_xdebug-2.3.3-5.6-vc11.dll

看着最后一条消息,我想可能是扩展目录导致了问题,我在php.ini文件中看到了这一行: extension_dir = "ext"

所以我改用了:zend_extension=php_xdebug-2.3.3-5.6-vc11.dll 它工作了!!


Dol*_*rma 5

在最新版本中,xampp您只需添加zend_extension=xdebugphp.ini,例如:

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"
Run Code Online (Sandbox Code Playgroud)