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
Comments
Learn how to write custom Drupal modules
Does Drupal module development make your head explode and drive you crazy?
Why not learn from someone who has paved the way instead?
Sign up to Master Drupal 7 Module Development.
I am
Well, 240 did not work for me and then I changed it to 600, restarted Apache, and it worked. cheers!
Post new comment