在 PHP 中安装 XDebug 时遇到问题 [英] Having trouble installing XDebug in PHP
问题描述
我尝试在 PHP 上配置 XDebug.我从 http://xdebug.org/ 下载了 XDebug DLL.我尝试了所有可能的版本,并按照它的建议编辑了 php.ini,但是当我使用 phpinfo()
来查看 xdebug 信息时,我什么也得不到.有什么想法吗?
I try to config XDebug on PHP. I download the XDebug DLL from http://xdebug.org/. I tried every possible version, and edit the php.ini as it suggested, but when I use phpinfo()
to see the xdebug info I get nothing at all. Any ideas?
我的环境是 PHP 5.4 + Apache2.2 + Windows 7.
My environment is PHP 5.4 + Apache2.2 + Windows 7.
推荐答案
首先,按照 xDebug 站点上的这些说明进行操作 正确安装模块(我认为您已经完成了!...使用向导!!).(http://xdebug.org/wizard.php)
First, follow these instructions on the xDebug site to install the module correctly (Which I think you've done!.. Use the wizard!! ). (http://xdebug.org/wizard.php)
当您运行 phpinfo()
时,您应该看到以下内容(如果安装正确):
When you run phpinfo()
, you should see the following (If installed correctly):
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
with Xdebug v2.2.0, Copyright (c) 2002-2012, by Derick Rethans <-- !! :D !!
然后,您需要将以下内容添加到您的 php.ini
.
Then, you will need to add the following to your php.ini
.
[xdebug]
# Make sure the below path is correct and points to your 'xdebug.so'
zend_extension="/Applications/MAMP/bin/php/php5.2.17/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so"
xdebug.default_enable=1
xdebug.max_nesting_level=100
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug" # I use netbeans IDE, so I configure this
记住: 对 php.ini
进行任何更改后,您必须重新启动 apache 服务器.
Remember: After making any changes to php.ini
you must restart your apache server.
这篇关于在 PHP 中安装 XDebug 时遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!