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

Jaypan’s picture

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?

henk’s picture

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.

mmjvb’s picture

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

henk’s picture

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.

walid-mokrani’s picture

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

qaribhaider’s picture

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 :)

tarun_nagpal’s picture

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

DanyFelz’s picture

Hey man thank you, this worked for me :D

Michael Soibeman’s picture

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

vinayak nair’s picture

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.

Sahil Gupta’s picture

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