在centos 6.4上使用xdebug进行远程调试

Hay*_*ate 3 php centos xdebug

我尝试用phpstorm远程调试php应用程序.我在vmware虚拟机上使用centos 6.4,php5.3和apache 2.2,在真正的ubuntu上使用firefox的phpstorm.xdebug真正安装:

Installed Packages
Name        : php-pecl-xdebug
Arch        : i686
Version     : 2.1.4
Release     : 1.el6
Size        : 580 k
Repo        : installed
From repo   : epel
Summary     : PECL package for debugging PHP scripts
URL         : http://pecl.php.net/package/xdebug
License     : PHP
Run Code Online (Sandbox Code Playgroud)

phpinfo也证实了这一点:

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with Xdebug v2.1.4, Copyright (c) 2002-2012, by Derick Rethans
Run Code Online (Sandbox Code Playgroud)

当我通过ssh从控制台运行脚本(简单的hello world)时,我的脚本停止了,我从xdebug和xdebug连接到mu ide并在自己的日志中写入信息.但是当我从browsen运行脚本时 - 即使在xdebug日志中也没有效果.我尝试使用firefox扩展来启动调试会话,我尝试使用xdebug.remote_autostart = 1选项,tru关闭了centos中的iptables,但也没有效果.我做错了什么?xdebug配置:

; Enable xdebug extension module
zend_extension=/usr/lib/php/modules/xdebug.so
;xdebug.remote_host=10.0.0.1
xdebug.remote_connect_back=1
xdebug.remote_enable=1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
;xdebug.remote_mode=req
;xdebug.profiler_enable=1
;xdebug.profiler_enable_trigger=1
;xdebug.remote_autostart=1
;xdebug.idekey=PHPSTORM
xdebug.remote_log="/tmp/xdebug.log"
Run Code Online (Sandbox Code Playgroud)

Hay*_*ate 6

天啊,问题解决了.这都是selinux.

setsebool httpd_can_network_connect = 1,nttpd restart - 和phpstorm从xdebug获取连接.