Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suppress the message "Fatal error: Maximum execution time of 30..."

I'm using register_shutdown() to provide show a page if upload takes a long time causing a PHP timeout. I really don't need to show the fatal error to the user, how can hide that message?

like image 248
gremo Avatar asked Dec 17 '11 20:12

gremo


People also ask

How do you fix max execution time of 30 seconds exceeded?

The easiest solution to this problem is increasing the time limit. Changing it to 300 seconds (5 minutes) is often more than enough. If that doesn't help, you can try setting even higher values for maximum execution time.

How do you fix maximum execution time of 60 seconds exceeded?

Look for : $cfg['ExecTimeLimit'] = 600; You can change '600' to any higher value, like '6000'. Maximum execution time in seconds is (0 for no limit). This will fix your error.


1 Answers

You would want to set the display_errors directive in your php.ini to off on your production machine. Alternatively if your script doesn't have any fatal errors beyond the timeout issue you may use ini_set to turn off displaying errors at runtime.

like image 149
Charles Sprayberry Avatar answered Oct 02 '22 00:10

Charles Sprayberry