![](/img/trans.png)
[英]How to call Apis in HasOffers and establish connection between server and client
[英]Cannot establish connection between Xdebug Client and Server
我正在嘗試使用dbgp
客戶端執行xdebug
但無法與服務器建立連接。
我的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
我究竟做錯了什么?
沒關系,由於某種原因,客戶端被設置為9000。 所以我將xdebug端口設置為9000,現在可以正常工作了
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.