Stopping the embedded php server on Mac Mavericks - Livecode

I am developing something in Livecode, and I experimented using my own built-in php server Mavericks. I started the server by sending the following command through the shell ...

php -S localhost:8000 

This allowed PHP to work successfully through localhost: 8000 /

However, I cannot decide how to stop / disable PHP now to continue testing it. When I previously ran PHP through the terminal, I was able to do ctrl + c to stop php from starting, but since I don’t know how to do this through my application. I get this error instead.

 Failed to listen on localhost:8000 (reason: Address already in use) 

Does anyone know how I can stop it either through the terminal or through the Livecode application? Attempts to stop it through the terminal using ctrl + c do not work.

+7
php terminal osx-mavericks macos livecode
source share
1 answer

open a terminal and enter:

 ps -ef | grep php 

it will list the php process with pid (process id)

something like

 $ ps -ef | grep php 501 14263 14133 0 10:25AM ttys001 0:00.21 php -S localhost:8000 501 14355 14265 0 10:25AM ttys002 0:00.00 grep php 

Pay attention to the line number where your php process is indicated, the second column is your pid in the example process id us 14263, kill it:

 $ kill 14263 

do another ps

 $ ps -ef | grep php 501 14358 14265 0 10:26AM ttys002 0:00.00 grep php $ 

The process should no longer be specified

+27
source share

All Articles