xDebug 出现在命令行“php -m"中;, 但不在 phpinfo() [英] xDebug shows up in command line "php -m" , but not in phpinfo()

查看:29
本文介绍了xDebug 出现在命令行“php -m"中;, 但不在 phpinfo()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 64 位 Windows 7,安装了 xampp 3.2.1.我通过 xdebug.org 向导获得了我的 xdebug dll 文件,并将它放在向导告诉我的地方,C:\xampp\php\etc.然后我确保修改了 C:\xampp\php\php.ini 中正确的(据我所知)php.ini 文件.这与 phpinfo() 报告的 ini 相同.

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.

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

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.

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

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():无法绑定地址[10048]:通常每个socket地址(协议/网络地址/端口)只能使用一次

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

推荐答案

经过几个小时的拉头发...和小睡后,我发现了这个配置代码,它以某种方式起作用了.现在扩展已经稳固,我可以开始小心地一次添加或删除一个功能.

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"

根本问题是一个搞砸的 php.ini 文件.问题是 xampp 的 php.ini 列出了一些默认值,xdebug、netbeans 和其他在线指南告诉我们取消注释.不幸的是,考虑到某些值的组合,那是行不通的.不过,这个参数列表肯定对我有用.

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.

这篇关于xDebug 出现在命令行“php -m"中;, 但不在 phpinfo()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆