I am running a php script that checks sendmail and, for testing purposes, displays the results in a browser. It works fine until there is a connection error at which time it aborts (somewhat) gracefully. This is not a problem, per se, other than it relies on the a timeout to close the open mailbox. The problem is, as long as the mailbox is open and the script process is running in apache the script will not work again. In addition to all the mail connection error control I need to kill the apache process.
On a botched connection attempt the browser hangs indefinitly (without timing out on a 404 or other error), indicating the apache process is still "in progress"?
A check with server-status shows the script running with PID nnnn and Mode Of Operation as _ (underscore), as is normal.
An attempt to stop the process (server command line) using - kill pid nnnn - returns the response - kill: No such pid pid - , but server-status shows that the PID is now - (PID replaced with a dash) and Mode Of Operation is now . (dot).
Is there a way to identify and kill the process through using php?
Thanks
Dave