detect a script crash
| From: | Ashley Sheridan | Date: | Fri, 02 Jul 2010 10:51:51 +0000 |
| Subject: | detect a script crash | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-306628@lists.php.net to get a copy of this message | ||
Hi all,
Bit of a curve ball here (at least I couldn't find anything on Google
yet) but I need a way to be able to detect if a particular php script
crashes and generate some form of report from it.
Here is the system setup:
CentOS system, with the PHP scripts running as CLI called from a bash
script as part of a daemon. The setup is already all in-place for an
existing system, I've just been asked to implement a crash detection
system.
I know I can monitor the error logs with tail() to detect errors, but
that is likely not going to be the main issue which needs tracking.
I've found a bit of documentation online for pcntl_signal() which I
believe should do the trick, but I can't seem to find just a plain old
list of signal monikers and their meanings. Does anyone have any light
to shed on this?
Also, any other input/suggestions would be more than welcome.
Thanks,
Ash
http://www.ashleysheridan.co.uk