我正在尝试使用xdebug
客户端执行dbgp
,但我无法与服务器建立连接。
我的phpinfo:
xdebug.remote_enable On
xdebug.remote_handler dbgp
xdebug.remote_host localhost
xdebug.remote_mode req
xdebug.remote_port 9001
我先运行客户端:
[/usr/local/bin]# ./debugclient
Xdebug Simple DBGp client (0.10.0)
Copyright 2002-2007 by Derick Rethans.
- libedit support: enabled
Waiting for debug server to connect.
我运行脚本:
# export XDEBUG_CONFIG="idekey=netbeans-xdebug"
# php -dxdebug.remote_enable=1 debug_tmp.php
检查统计数据:
# netstat -ant
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:2082 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:2083 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:2086 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:2087 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:9000 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:587 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:783 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:2095 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:2096 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:465 0.0.0.0:* LISTEN
tcp 0 0 69.174.52.164:22 111.94.64.239:7531 ESTABLISHED
tcp 0 64 69.174.52.164:22 111.94.64.239:1698 ESTABLISHED
tcp 0 0 127.0.0.1:31750 127.0.0.1:80 TIME_WAIT
tcp 0 0 :::21 :::* LISTEN
tcp 0 0 :::22 :::* LISTEN
tcp 0 0 :::25 :::* LISTEN
tcp 0 0 :::443 :::* LISTEN
tcp 0 0 :::993 :::* LISTEN
tcp 0 0 :::995 :::* LISTEN
tcp 0 0 :::3306 :::* LISTEN
tcp 0 0 :::587 :::* LISTEN
tcp 0 0 :::110 :::* LISTEN
tcp 0 0 :::143 :::* LISTEN
tcp 0 0 :::111 :::* LISTEN
tcp 0 0 :::80 :::* LISTEN
tcp 0 0 :::465 :::* LISTEN
但是,仍然没有建立联系。
Log opened at 2015-01-28 12:22:03
I: Connecting to configured address/port: localhost:9001.
E: Could not connect to client. :-(
Log closed at 2015-01-28 12:22:03
我做错了什么?
答案 0 :(得分:0)
没关系, 由于某种原因,客户端设置为9000。所以我将xdebug端口设置为9000,现在它正在工作