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.


Need Your Help

Get user email info from a Dotnet Google API

c# .net google-drive-sdk gdata

I'm have working two separate implementations of Oauth2 for both the gData and the Drive C# APIs, storing token information in an OAuth2Parameters and AuthorizationState respectively. I'm able to r...

Best way to convert this flash application to iphone compatible?

iphone ios html5 flash canvas

I have an interactive flash animation which i need to be able to use on an iPhone, embedded within an iPhone app.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.