【问题标题】:xdebug not connecting with client?xdebug 没有与客户端连接?
【发布时间】: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

标签: xdebug fedora selinux


【解决方案1】:

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

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

setsebool -P httpd_can_network_connect on

操作系统 Fedora 16-X_64

【讨论】:

  • 对于搜索者:在 CentOS 上遇到了这个,这对我有用。
【解决方案2】:

对我来说解决方案是

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

意思是 SELinux 现在允许 httpd 执行这​​个共享对象。

【讨论】:

    猜你喜欢
    • 2013-06-06
    • 1970-01-01
    • 2019-09-29
    • 1970-01-01
    • 2017-05-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-12-13
    相关资源
    最近更新 更多