PHP max_execution_time error with Drupal and XAMPP

I recently had a problem where PHP was timing out at 60 seconds when running a Drupal site using XAMPP on Windows (yeah I know, Windows and XAMPP sucks). I tried changing my php.ini file to 240 seconds, but it made no difference, it would still time out at 60 seconds. Here are the steps I made to fix this issue.

  1. Set the php.ini max execution time to 240:
    1. max_execution_time = 240 ;
  2. Restarted Apache (still timing out at 60 seconds)
  3. Did a search for any other php.ini files None were found, but if they were, remove to avoid conflicts (or change the max execution time there as well)
  4. In Drupal's settings.php, add the following:
    1. ini_set('max_execution_time', 0);

This final step solved the issue for me. 0 sets the max execution time to unlimited

If you are using PHP 5.1.3, check out this bug:


Well, 240 did not work for me and then I changed it to 600, restarted Apache, and it worked. cheers!

Unfortunately the "ini_set('max_execution_time', 0);" did not help whatsoever for me, and my site still tells me the 30 seconds meesage whenever I try to update module configurations, and it keeps complaining about a different file every single time. Drupal 6 can be very stupid sometimes.

Have being having this problem on a drupal site that was slated to be published before the end of the year.. I ve tried changing the ini time out to 0. But it wouldnt bulge.i am presently hoping this does it for me.. Running drupal 7 on xamp.

I heard that a lot of friends of mine encountered an error like this as they have been using PHP with Drupal and XAMPP. I am glad that you discussed in detail about the PHP max_execution_time error which is now a common error seen this platform while running

ini_set('max_execution_time', 0); worked. thanks for the solution!

Great tutorial. This tutorial was really helpful to known the execution time limit in PHP. This is helpful to beginners. Thanks.

New comments for this tutorial have been turned off.