Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By chdrup on
I am trying to install Drupal 7 on my wamp server.
After giving the database name,username it is giving the following error and stopped the installation.
Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp\www\drupal\includes\database\database.inc on line 2168
Please anyone help me on this. Where should i change the execution time?
I changed the max execution time to 0 in Phpmyadmin settings, but still it is giving me the same error. I really dont know where to change the settings.
Thanks in advance.
Comments
If you set it to 0, and you
If you set it to 0, and you are still seeing the problem, it means that it didn't work. Did you re-start your server after making the change?
it is better to have some
it is better to have some time execution limit on production, so e.g change back this setting to 30s after installation. It is easy to DoS server with it e.g. with never ending loop.
Ratio Web
Set it for PHP
You need to set it for PHP, normally php/php.ini and restart apache to make it effective. Setting it for phpMyAdmin doesn't effect Drupal installation. They are different php applications with their own private settings.
To me, wamp and production sounds as termino contradiction. Prefer to have the php scripts uninterupted. Depends on what causes you more problems: DoS or script aborts
This issue in the top of
This issue in the top of search results "Maximum execution time of 30 seconds exceeded Drupal 7" and imho it's good to mention that above solution is only for local environment.
Ratio Web
Change the max_execution_time in the two php.ini files
Open the two php.ini files located in "path-to-wamp/bin/apache/ApacheX.X.X/bin/" and "path-to-wamp/bin/php/phpX.X.X/".
Change the max_execution_time to 1200
Update
Dear, it is not necessary to change the settings from Php.ini, you can easily do it from below method:
Goto :
[Base-Url] / sites / default /
Open, settings.php which you should have renamed from default.settings.php
Edit the file, and put this on the very beginning of file:
ini_set('max_execution_time', 0);
Run, it will work, no need to restart your apache service. Cheers :)
Temporary and dangerous solution
Hello qaribhaider,
The solution you provided is a quick way to remove the error but not a good practice. It will make all of the PHP scripts to run for a unlimited time and if any unresponsive or faulty code occurs it will be spread-ed. Its always better to change in the php.ini file as specified above.
Regards
Tarun Nagpal
Thank you
Hey man thank you, this worked for me :D
Thank you for your suggestion
Thank you for your suggestion. Had version 8.0.3 working and tried to update to 8.0.5 but couldn't get it to work until I did as was suggested. I had changed my timeout on my server (/etc/php7/apache2/php.ini) but that didn't work so I did what you said in 'settings.php' -> [ini_set('max_execution_time', 0);] and all is well. Perhaps the developers might consider adding a warning when install fails due to 'php' timing out during install..
Anyway thank you again.
Michael Soibelman
P.S. Don't know why this never happened before but maybe Apache is tired... LOL
Alternative solution
Hi,
you can set your max execution time to a greatest number like 1000,3000,etc.
this helped me to solve the problem,hope you will find solution by applying this.
PHP Runtime Configurator Module
You can use a module to control this maximum time execution limit. PHP Runtime Configurator module provides many options to configure without changing your php.ini file and restart Apache.
You can configure following parameters:
- File Upload Limit
- Memory Limit
- Maximum Execution Time Limit
- Maximum Input Variable Limit