PHP Fatal error: Maximum execution time of infinity exceeded!

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.

  1. libapache2-mod-php5 5.2.1-0ubuntu1.2 []

7 thoughts on “PHP Fatal error: Maximum execution time of infinity exceeded!

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

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

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>