When PHP is processing a file upload and you receive the error message “Fatal error: Maximum execution time of 30 seconds exceeded” it is because the script has timed out. I was working on an application where this was occuring during a file upload. The entire file would be uploaded, then the error would be displayed
Various websites instruct you to call set_time_limit() on the upload page. This overrides the max_execution_time setting which is found in php.ini. Calling this function on my upload page seems to have no effect on my server. Changing max_execution_time in php.ini to 0 is supposed to be an unlimited timeout. However i was still receiving the error message. It would say “Fatal error: Maximum execution time of 0 seconds exceeded” which does not make any sense to me at all.
I discovered that, in addition to max_execution_time there is an additional setting max_input_time which controls how long a php file can spend processing the request data. When i set max_input_time to a higher value, the problem goes away. So, it appears that the error message is reporting the wrong configuration variable.
These settings are found in php.ini, however depending on your host you may be able to override them either in your script or in an .htaccess file. After you update php.ini you may have to restart your https server process to reload the php settings. (windows servers may need to recycle the application pool).