News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Fatal error: Maximum execution time of 30 seconds exceeded

Started by Meshin, October 21, 2011, 12:11:26 AM

Previous topic - Next topic

Meshin

I've been working on this all day. The first few days I had the forums set up it ran fine, a little slow, but fine. Then over the last few days I have been getting a series of error messages that look like this:

Fatal error: Maximum execution time of 30 seconds exceeded in D:\Hosting\8468209\html\forums\Sources\Load.php on line 2674

Fatal error: Maximum execution time of 30 seconds exceeded in D:\Hosting\8468209\html\forums\Sources\Load.php on line 1969

Fatal error: Maximum execution time of 30 seconds exceeded in D:\Hosting\8468209\html\forums\cache\data_edad9a391045bfa15f0768de76a1735e-SMF-modSettings.php on line 1



The website its self runs and loads just fine, but when ever I try to load the page I only get this error. The URL there in the error message differs each time until recently. I've looked and tried to find a solution already on the forums. I've tried inserting the code

"set_time_limit(90);"

Into the index.php file at the top just under the first line, and this seemed to work for about 10 minutes, was loading really fast like it should. But not it's not working at all, I've also tried removing the code again to get it back to where it would at least load the forums, but I get nothing now.

In the posts and replies I've read it kept saying something about wrong the configuration of the server being set up wrong by the host. Is this still the case, and I should contact hxxp:godaddy.com [nonactive] and see if I can get the issue resolved with them? Or has any new information come to lite so that I may be able to fix the issue myself?

Thanks for your time, and let me know if there is any other information you need.

Meshin


kat

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).

Leeched from http://verysimple.com/2006/03/30/fatal-error-maximum-execution-time-of-30-seconds-exceeded

MrPhil

Quote from: Meshin on October 21, 2011, 05:26:12 AM
Really, no one has any suggestions? =\
Don't bump within 24 hours. That's considered extremely rude. Everyone here is a volunteer who donates their time to answer questions.

Meshin

Well I'm still working on getting this resolved. I just don't know much about PHP and I don't have access to the original php.ini file to edit, but the advice given is solid so I'm marking this as solved for now. Thanks for the help. =3

Now I just need to figure out how to get my own php.ini file to work/set up.

Illori

usually you need to ask your host to do the change for you.

MrPhil

It depends on your server setup. Sometimes you are free to create and edit your own php.ini file, and other times your host won't let you, or it may be under a different name. There may be a system php.ini that you can't touch, but you can always try creating your own at your site root or your SMF installation root. Most of the time, if your own php.ini is permitted, there is not one created by default (unlike .htaccess). Give it a try.

Advertisement: