I am working on an application that runs locally on a Fedora 10 machine through PHP and Apache. It depends on a process that runs in the background.
The higher-ups want to be able to start/stop/restart the process, through the browser. I was trying to get this to work by having PHP make calls to the system using exec() and shell_exec, but it doesn't seem to work.
When I try to start the process using "exec('processName')", nothing happens.
When I try to use "exec('killall processName')", SELinux starts constantly popping up warnings that the process was permitted (because I put it into permissive mode), however it doesn't actually kill the process! But this seems to go on even after the page is fully loaded!?!?
I AM able to call another script in a similar fashion: "exec('/var/www/cgi-bin/ControlProgram START')". So I'm not really sure what the major differences are between the two calls/commands.
I also put the script call into the /etc/rc.local file to have the script run at login. However, will I be able to kill this script from PHP since its run by... the system?
I'm not a guru when it comes to permissions/SELinux, so don't spare on the gory details! Thanks in advance!