2012-04-04 46 views
11

我有php运行在Apache上。我已经下载了我认为是PHP版本5.4 64位窗口正确的xdebug编译的dll。我有线程安全启用,它使用VC9。我已经下载DLL和放置在这里:XDebug不加载在Windows 7 64位PHP 5.4

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 

回答

14

好吧,它现在正在工作,我想我知道什么是错的。我使用的是64位版本的PHP,但是使用了32位版本的Apache和64位版本的xdebug。我开始使用Apache 2.4 32位,因为似乎没有php5模块的64位版本。所以,我确定我有32位版本的一切。我正在使用VC9,线程安全的php5.4。

本博客文章有助于在设置它: http://lifeofageekadmin.com/how-install-apache-2-4-php-5-4-and-mysql-5-5-21-on-windows-7/

1

看一看C:\php5\ext,看看php_xdebug.dll已经在那里了。如果没有,请尝试重新命名php_xdebug-2.2.0RC1-5.4-vc9-x86_64.dllphp_xdebug.dll并把它放在C:\php5\ext,然后改变你的php.ini除了:

[xdebug] 
zend_extension = "C:\php5\ext\php_xdebug.dll" 
+0

php_debug.dll是不是在那里。我按你的要求做了,但仍然有错误。 – 2012-04-05 01:06:34

+0

嗯,这是值得一试。我唯一可以做的其他建议是,您尝试在这里使用Xdebug二进制文件运行PHP 5.3:http://downloads.php.net/pierre/ – Xenon 2012-04-05 03:25:45

31

为了确保您下载正确的二进制文件,你可以在http://xdebug.org/wizard.php使用向导它会告诉你到底要下载哪个文件,以及在哪个php.ini文件中应该放入zend_extension行(当然,当你使用“Failed to load”错误时,你正在使用正确的文件)。

+0

由于某些原因,当我尝试此操作时,向导不起作用。它实际上还没有工作。我到我的本地主机上的phpinfo.php页面,点击CTRL + A,然后按CTRL + C并将结果粘贴到向导中。它吐出一些信息,但并不完整。然后它说:“找不到任何有用的信息。” – 2012-04-05 13:41:12

+0

的确,我刚刚更新了它。检查它现在是否有效? – Derick 2012-04-06 10:50:52

+0

对不起,不,它还没有工作。 – 2012-04-08 01:56:11

4

OK,我知道这是一个很老的僵尸线程,但是在经历过这个问题,我自己跑最近,它原来有一个简单的解决方案。

PHP.INI需要对目录使用正斜杠,而在Windows下安装XDebug的指令使用反斜杠。因此,对于上面原有的问题,解决的方法是改变的zend_extension行改为:

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

希望这可以帮助。

+2

这似乎不是真的。这里是我的ini条目:zend_extension =“C:\ development \ languages \ php5517tsx86 \ ext \ php_xdebug-2.2.5-5.5-vc11.dll”,它的工作原理。 – 2015-02-26 18:53:25

+0

我也有反斜杠,一切正常,我的问题是,我有一个x64系统上的x86 PHP,并错误地使用x64 Xdebug dll。帮助检查'phpinfo();'输出你自己并选择x86/x64和TS/NTS – kit 2016-09-16 09:37:03

+0

我有反斜杠,适用于我,但不适合我的同事。正斜杠不适用于她... – Tech 2016-09-23 12:58:13

3

我终于得到了这个工作。 按照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 它的工作!

+0

谢谢,这是我需要的Windows 10的修复程序。 – 2017-09-29 06:43:10

0

有同样的问题。对我而言,我需要绝对路径zend_extension,在引号中(但反斜杠都很好)。

0

我有64位Windows 7和PHP v5.4.4,但X-调试,我需要下载的版本是:

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

因为IIS不能与Xdebug的64位工作

也是我的php.ini指令:

[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"