I've been playing around with a system I'm developing and managed to get it to cause this:
Fatal error: Maximum execution time of 30 seconds exceeded
It happened when I was doing something unrealistic, but nevertheless it could happen with a user.
Does anyone know if there is a way to catch this exception? I've read around but everyone seems to suggest upping the time allowed.
How about trying as PHP documentation (well... at least one of its readers) say:
<?php
function shutdown()
{
$a = error_get_last();
if ($a == null) {echo "No errors";}
else {print_r($a);}
}
register_shutdown_function('shutdown');
ini_set('max_execution_time', 1);
sleep(3);
?>
Have a look at the following links: