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?
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.
To hide the error message, you can use error_reporting(E_NONE) to suppress all error messages.
Or, you can just do a ini_set('display_errors','0'); to hide the error messages from being displayed, and log them.