Hi there,

How can I determine if a script is terminated normally or with an error
(execution time out, memory limit exceeded, etc.)?

I'm writing a new PHP extension, and I need to generate an alert if the
script is terminted due to a timeout error or memory limit exceeded error.
However, I cannot find a way to determine the error status.

For time out error, there is a global flag, PG(connection_status), which
supposedly should be set to PHP_CONNECTION_TIMEOUT when timeout happens, but
the flag remains as PHP_CONNECTION_NORMAL.

For memory exceeded error, there is also a global flag,
AG(memory_exhausted). Unfortunately the flag doesn't change when a memory
error happens.

And there is no other global error status, error msg, or errno indicating
the errors.

Can somebody suggest a possible solution for me to get the error? Thanks a


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to