[英]xDebug shows up in command line “php -m” , but not in phpinfo()
I am on windows 7, 64bit, with xampp 3.2.1 installed . 我在安装了xampp 3.2.1的Windows 7、64bit上。 I got my xdebug dll file through the xdebug.org wizard, and put it where the wizard told me to, C:\\xampp\\php\\etc.
我通过xdebug.org向导获取了xdebug dll文件,并将其放在向导告诉我的位置C:\\ xampp \\ php \\ etc。 Then I made sure to modify the correct (and as far as I'm aware only) php.ini file at C:\\xampp\\php\\php.ini.
然后,我确保在C:\\ xampp \\ php \\ php.ini中修改正确的(据我所知)php.ini文件。 This is the same ini that phpinfo() reports.
这与phpinfo()报告的ini相同。
When I run php -m , I can see the xDebug extension listed twice, just as it should be. 当我运行php -m时,我可以看到xDebug扩展名被列出了两次,正如它应该的那样。 But going back to a phpinfo() output, the extension is not listed.
但是返回phpinfo()输出,未列出扩展名。
I've tried restarting my computer, apache. 我已经尝试过重新启动计算机,Apache。 If I try to run this script to test if xdebug is working, it gives me a error
如果我尝试运行此脚本以测试xdebug是否正常运行,则会给我一个错误
socket_bind(): unable to bind address [10048]:Only one usage of each socket address (protocol/network address/port) is normally permitted
socket_bind():无法绑定地址[10048]:通常只允许每个套接字地址(协议/网络地址/端口)使用一次
After hours of hair pulling... and a nap, I came across this config code and it somehow worked. 经过数小时的梳理……和午睡,我遇到了这个配置代码,它以某种方式起作用。 Now that the extension is on firm ground, I can start carefully adding or removing features one at a time.
既然扩展已经牢固,那么我可以开始仔细地一次添加或删除功能。
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"
The root problem was a messed up php.ini file. 根本问题是一个混乱的php.ini文件。 The problem is that xampp's php.ini has some defaults listed there that we are told to uncomment by xdebug,netbeans, other online guides.
问题是xampp的php.ini中列出了一些默认值,xdebug,netbeans和其他在线指南都告诉我们取消注释。 Unfortunately, given the certain combinations of values, that just didn't work.
不幸的是,鉴于某些特定的价值观组合,这根本行不通。 This list of parameters definitely worked for me though.
不过,此参数列表肯定对我有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.