Skip to content
Advertisement

Error running script.php: Port 9000 is busy

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 .

Advertisement

Answer

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

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement