2011-11-24 66 views
6

xdebug服务器没有连接到9000端口上的任何客户端即:Netbeans IDE,debugclient etc.xdebug显示在phpinfo输出中。上述客户端不断等待连接建立。尝试从它提供了以下警告消息CLI PHP脚本:xdebug没有连接客户端?

“PHP警告:模块‘Xdebug的’已装入未知在线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 no。一致

Xdebug简单DBGp客户端(0.10.0) 版权所有2002-2007 Derick Rethans。 - libedit支持:启用

等待调试服务器连接。

是黑魔法!

谢谢

+0

它实际上是Selinux不允许Httpd连接到其他网络资源。设置httpd的布尔值解决了问题。 setsebool -P httpd_can_network_connect – Alex

回答

4

实际上Selinux并不允许Httpd连接到其他网络资源。

设置为httpd布尔解决了这个问题:

setsebool -P httpd_can_network_connect on 

OS的Fedora 16 X_64

+0

对于搜索者:在CentOS上运行这一个,这对我很有帮助。 – Walf

0

对我来说,解决办法是

sudo chcon -R -h -t /path/to/xdebug.so 

意义的SELinux现在允许httpd的执行这个共享目的。