PDA

View Full Version : Process being killed by apache


Extreme43
12-23-2005, 01:18 PM
Hey,
i use shell_exec() to create a shoutcast server on a linux based system.
It is working fine until i created a second account in cpanel and installed the script.
Same server, same code except every 1-2 minutes the server on the second account will be killed.
We had a few ideas as the process was being run by nobody maybe the server picked that up and killed it. Except, The server runs stable on the first account.
The code to execute servers is....

$pid = shell_exec("nohup ./public_html/files/linux/sc_serv ./public_html/temp/1120312_8000.conf > /dev/null & echo $!");

Velox Letum
12-23-2005, 07:23 PM
$pid = shell_exec("nohup ./public_html/files/linux/sc_serv ./public_html/temp/1120312_8000.conf & > /dev/null & echo $!");

Try appending an & to the command as I have above, and see if running it in the background will run it correctly. It's my theory that when Apache stops and the page timeout has been reached it terminates, taking shoutcast with it.

Extreme43
12-25-2005, 11:34 AM
yeah thanks. there is a "&" in it ;)
we have progressed a bit further into the problem and will post here if and when we fix it ;)