dongzi1397 2013-10-01 06:15
浏览 617
已采纳

运行script.php时出错:端口9000正忙

I set php.ini and Debug config in phpstorm. Trying to debug php script outputs in phpstorm Event log with:

"Error running script.php: Port 9000 is busy"

end of php.ini:

        [XDebug]
        zend_extension="/usr/lib/php5/20090626+lfs/xdebug.so"
        xdebug.remote_enable=1
        xdebug.remote_port="9000" (the default port is 9000)
        xdebug.profiler_enable=1
        xdebug.profiler_enable_trigger = 1
        xdebug.profiler_output_dir="/etc/php5/xdebug/profiler_output_dir"

Debug port in pStorm is also set on 9000. netstat -na outputs with:

tcp        0      0 127.0.0.1:9000          0.0.0.0:*               LISTEN 

What if I set to other port. eg setting it to 10001 seems to do the job. Or just how to make it work properly. I am not sure if I understand how the xDebug works. Its like running Debug("script.php")(Shift+F9) in phpstorm with set breakpoint in file ?

Does somebody have an idea ?

EDIT:

From: http://xdebug.org/docs/remote

xdebug.remote_port
Type: integer, Default value: 9000
The port to which Xdebug tries to connect on the remote host. Port 9000 is the default for both the client and the bundled debugclient. As many clients use this port number, it is best to leave this setting unchanged.

What if I change port for other than 9000 ? Maybe something over 50k .

  • 写回答

6条回答 默认 最新

  • drztpx8735 2013-10-01 11:12
    关注

    Could not identify with lsof and netstat the pid of process running on 9000 port. Temporary simplest sollution is just to change the port in phpstorm and php.ini for something else not actually used (like 10k).

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(5条)

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!