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条)

报告相同问题?

悬赏问题

  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么