PHP Fatal error: Maximum execution time of 0 seconds exceeded
Lately, I have been working with some big blog exports from Movable Type and TypePad. I was thankful to notice Mark Jaquith recently patched the WordPress MT importer to allow uploading the import file directly (ftp, scp) and then run the import against the file already on the server.
In my vanilla development Ubuntu 7.04 environment1, 150 of 1500 posts in, on one with a lot of comments it failed with
Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/wp/trunk/wp-includes/plugin.php on line 74
Ok, so I updated max_execution_time = 0 , and 150 posts it fails again, this time with
Fatal error: Maximum execution time of 0 seconds exceeded in /var/www/wp/trunk/wp-includes/plugin.php on line 141
Maximum execution time of 0 seconds exceeded?! 0 is supposed to be for unlimited. I have been to infinity and beyond!
Thanks to verysimple.com’s blog I found out that the error is misreported and the real problem is now max_input_time . I don’t know how I would have figured this out if others had not shared it!
Setting this also to zero and the import was successful (though slow). I did not trust that there would not be any duplicates or partial entries, so I cleaned out the content and did it one more time.
- libapache2-mod-php5 5.2.1-0ubuntu1.2 [↩]
Of course, I would not use/leave those “infinite” values in a production environment.
I looked at bugs.php.net , but am a bit intimidated to submit this as a bug report specifically without testing on PHP trunk, which I am also intimidated to try.
Possibly related bugs:
Bug #28572 termination because of max_input_time returns error for max_execution_time
http://bugs.php.net/bug.php?id=28572
Bug #39448 Maximum execution time exceeded even if is unlimited
http://bugs.php.net/bug.php?id=39448
i are right. i was able to reproduce this with PHP 5.2.3 (cli) (built: Jun 29 2007 00:24:51)
with
max_execution_time = 0
max_input_time = 30
i got:
Fatal error: Maximum execution time of 0 seconds exceeded in /usr/local/apache2/htdocs/test.php on line 73
i’ve changed max_input_time = 0 and restarted apache, and it worked.
Thanks! This should fix my problem
“Fatal error: Maximum execution time of 0 seconds exceeded”… oxymoron? lol
Thank you very much!
your blog has solved my problem!
Thanks, the max_input_time had to be set to -1 it worked then
You’re an —== Angel ==— I’ve been changing my permalinks to something more short, I used ‘Dean’s Permalinks Migration plugin’ and all of a sudden couldnt access into the permalinks in my admin area to revert them back to the structure were before, getting the same error you did but just for different page(rewrite.php) , the new permalinks structure didnt work, so i started to mess with the .htaccess then realized its not exactly the issue as im getting the execution time out error, i suspected that the server was bit busy, as i experienced before some slowdown issues every time i was changing my permalinks structure on my blog, I was getting close searching the net for the execution error, but just one almighty ZERO (0) was able to change a nightmare into a light spark.. Thanks man.. you saved me a lot of time googeling around, appreciated! keep it up! A1on