我尝试使用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
并且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
当我通过ssh从控制台运行脚本(简单的hello world)时,我的脚本停止运行,我从xdebug获取mu ide的连接并在自己的日志中编写信息。 但是当我从浏览器运行脚本时-没有效果,即使在xdebug日志中也没有。 我尝试使用firefox扩展程序启动调试会话,尝试使用xdebug.remote_autostart = 1选项,关闭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"