Suppress the message "Fatal error: maximum runtime 30 ..."

I use register_shutdown() to show the page if loading takes a lot of time, causing a PHP timeout. I really do not need to show a fatal error to the user, how to hide this message?

+7
source share
2 answers

You would like to set the display_errors directive in your php.ini to your production machine. Alternatively, if your script does not have fatal errors outside the timeout, you can use ini_set to disable the display of errors at runtime.

+6
source

To hide the error message, you can use error_reporting(E_NONE) to suppress all error messages.

Or you can just do ini_set('display_errors','0'); to hide error messages from displaying them and register them.

+6
source

All Articles