xdebug没有与客户端连接?

时间:2011-11-24 12:44:40

标签: xdebug fedora selinux

xdebug服务器无法连接到端口9000上的任何客户端,即:netbeans IDE,debugclient等.xdebug显示在phpinfo输出中。上述客户端一直等待连接到建立。当我尝试从cli运行php脚本时,它会发出以下警告消息:

“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没有。重合

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

等待调试服务器连接。

这是黑魔法!!

谢谢

2 个答案:

答案 0 :(得分:4)

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

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

setsebool -P httpd_can_network_connect on

OS Fedora 16-X_64

答案 1 :(得分:0)

对我来说,解决方案是

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

意味着SELinux现在允许httpd执行这个共享对象。

相关问题