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

隐身守侯 提交于 2019-12-11 09:41:58

问题


I am on windows 7, 64bit, with xampp 3.2.1 installed . I got my xdebug dll file through the xdebug.org wizard, and put it where the wizard told me to, 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. This is the same ini that phpinfo() reports.

When I run php -m , I can see the xDebug extension listed twice, just as it should be. But going back to a phpinfo() output, the extension is not listed.

I've tried restarting my computer, apache. If I try to run this script to test if xdebug is working, it gives me a error

socket_bind(): unable to bind address [10048]:Only one usage of each socket address (protocol/network address/port) is normally permitted


回答1:


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. 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. Unfortunately, given the certain combinations of values, that just didn't work. This list of parameters definitely worked for me though.



来源:https://stackoverflow.com/questions/24190624/xdebug-shows-up-in-command-line-php-m-but-not-in-phpinfo

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!