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.
- Set the php.ini max execution time to 240:
max_execution_time = 240 ;
- Restarted Apache (still timing out at 60 seconds)
- 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)
- In Drupal's settings.php, add the following:
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:
http://bugs.php.net/bug.php?id=37306
If you found this useful, you might like to sign up to my mailing list for tips on getting started with Drupal module development. Includes free Starting Drupal Module Development series (coming soon).
You might also be interested in my book - Master Drupal 7 Module Development.
Hello!
I am Blair Wadman and this where I share tutorials and trouble shooting guides.
My latest project is writing Master Drupal 7 Module Development, a book to help you conquer the sometimes baffling world of Drupal development.
Master Drupal Module Development - 20% off
Sick of all the Googling? Climb the learning curve faster and start module developing today.
Currently 20% off!
Comments
Well, 240 did not work for
Well, 240 did not work for me and then I changed it to 600, restarted Apache, and it worked. cheers!
Unfortunately the "ini_set(
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
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.
Add new comment