【发布时间】:2012-01-05 15:16:01
【问题描述】:
xdebug服务器没有连接到任何9000端口的客户端 即:Netbeans IDE,debugclient etc.xdebug显示在phpinfo输出中。上面的客户端一直在等待连接到建立。当我尝试从 cli 运行 php 脚本时,它会给出以下警告消息:
“PHP 警告:模块 'xdebug' 已加载到 Unknown on line 0” 9000 端口已打开并显示在 netstat --numeric-port -l 命令中。 我不知道可能出了什么问题。我检查了所有配置文件,一切似乎都很好。任何帮助将不胜感激。 我的配置文件部分
Linux abc.localdomain 3.1.1-2.fc16.x86_64 #1 SMP Mon Nov 14 15:46:10 UTC 2011 x86_64
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
with Xdebug v2.1.2, Copyright (c) 2002-2011, by Derick Rethans
[Zend]
zend_extension=/usr/lib64/php/modules/xdebug.so
[XDebug]
xdebug.remote_enable=On
xdebug.remote_autostart=On
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.remote_log=/var/log/xdebug.log
php_api 号巧合
Xdebug 简单 DBGp 客户端 (0.10.0) 版权所有 2002-2007 Derick Rethans。 - libedit 支持:启用
等待调试服务器连接。
这是黑魔法吗!
谢谢
【问题讨论】:
-
实际上是Selinux不允许Httpd连接到其他网络资源。设置httpd的布尔值解决了这个问题。 setsebool -P httpd_can_network_connect on