使用nginx的Xdebug无法加载扩展


Xdebug with nginx failed to load extension

我在windows 7上安装了php 5.4.0和nginx 1.0.14。

当我想安装xdebug时,我下载了xdebug 2.20(5.4.0的新版本),然后我将dll复制到我的"php-ext"文件夹中。之后,我在php.ini文件中添加了这些行。

zend_extension = C:'nginx'php'ext'php_xdebug.dll 
[xdebug]
xdebug.remote_enable = 1
xdebug.remote_autostart=off
xdebug.remote_handler = dbgp
xdebug.remote_host = localhost
xdebug.remote_port = 9900 

但当我启动nginx时,似乎"加载C:''nginx''php''ext''php_xdebug.dll失败",但文件夹和文件是正确的。

但当我试图用"zend_extension_ts = C:'nginx'php'ext'php_xdebug.dll"更改"zend_extension = C:'nginx'php'ext'php_xdebug.dll"时,似乎没有任何错误,但我的phpinfo()文件似乎没有安装xdebug。

我怎样才能运行它?

您不应该再使用zend_extension_ts,而应该只使用zend_extension。_ts和_debug后缀已在PHP 5.3中删除。如果您看到"加载失败",很可能是您使用了错误的二进制文件。请参阅http://xdebug.org/find-binary.php看看你需要哪一个。