xDebug出现在命令行" php -m" ,但不是在phpinfo()

时间:2014-06-12 17:39:02

标签: php xampp xdebug

我在Windows 7,64bit上安装了xampp 3.2.1。我通过xdebug.org向导获取了我的x​​debug dll文件,并将它放在向导告诉我的地方,C:\ xampp \ php \ etc。然后我确保在C:\ xampp \ php \ php.ini中修改正确的(以及我只知道的)php.ini文件。这与phpinfo()报告的内容相同。

当我运行php -m时,我可以看到xDebug扩展名列出了两次,就像它应该的那样。但是回到phpinfo()输出,未列出扩展名。

我尝试重新启动计算机,apache。 If I try to run this script来测试xdebug是否正常工作,它会给我一个错误

  

socket_bind():无法绑定地址[10048]:通常只允许使用每个套接字地址(协议/网络地址/端口)

1 个答案:

答案 0 :(得分:2)

经过几个小时的拔毛...和午睡,我遇到了这个配置代码,它以某种方式工作。既然扩展是坚定的,我可以开始一次一个地小心地添加或删除功能。

zend_extension = "C:\xampp\php\ext\php_xdebug-2.2.5-5.5-vc11.dll" // whatever your file name is
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_enable=1
xdebug.remote_handler="dbgp"
xdebug.remote_host= "localhost"
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"

根问题是搞砸了php.ini文件。问题是xampp的php.ini有一些默认列表,我们被告知要取消注释xdebug,netbeans,其他在线指南。不幸的是,鉴于某些值的组合,这只是不起作用。这个参数列表肯定对我有用。