xDebug显示在命令行"php - ",但在phpinfo()中没有


xDebug shows up in command line "php -m" , but not in phpinfo()

我在windows 7, 64位,与xampp 3.2.1安装。我通过xdebug.org向导得到了我的xdebug dll文件,并把它放在向导告诉我的地方,C:'xampp'php'etc。然后我确保在C:'xampp'php'php.ini中修改正确的(并且据我所知只有)php.ini文件。这与phpinfo()报告的ini相同。

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

我试过重启我的电脑,apache。如果我尝试运行这个脚本来测试xdebug是否工作,它会给我一个错误

socket_bind(): cannot bind address[10048]:每个套接字地址(协议/网络地址/端口)通常只允许使用一次

经过几个小时的拉扯…然后打了个盹,我看到了这个配置代码,它不知怎么地起作用了。现在,扩展是坚实的基础,我可以开始小心地添加或删除一个功能的时间。

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和其他在线指南会告诉我们取消注释。不幸的是,给定某些值的组合,这不起作用。这个参数列表对我来说确实有效。