This could be an old issue as I have seen in Google search. I am trying to install Drupal 8.2.5 on localhost, but the installation ends up with a fatal error at the very end, while all 40 operations seem have been completed. An error message shows:

Fatal error: Maximum execution time of 30 seconds exceeded in <root folder>\core\lib\Drupal\Core\Database\Statement.php on line 59

Here is the PC S/W environment: Firefox 50.1.0, XAMPP v3.2.2 (Nov 12, 2015), Drupal 8.2.5
Machine: 64-bit Windows Pro 7 Service Pack-1, i5 CPU 3.2GHz, 8G RAM

The machine has been wiped clean. No other application was running at the time.

Please let me know if any suggestions on how to get around the issue.

Many thanks.

Comments

Moshk’s picture

Just tried again on Chrome 55.0, got same fatal error at the end.

mmjvb’s picture

Use max_execution_time = 0 in PHP.ini and restart apache.

Moshk’s picture

In considering the scenario that php.ini may not be accessible, I tried to make the change to settings.php directly and seems working.
1. Open and edit [Base-Url]/sites/default/default.settings.php
2. add a line
ini_set('max_execution_time', 0);
at the beginning (after <?php ).

Any downside of doing that? I watched the clock when re-installing Drupal after made the change. It took about 2 minutes to finish after the last task completed.

Thanks.

ravimane23’s picture

Hi Moshk.

I was also facing same issue in setting up Drupal 8.6 on windows 10 64 bit laptop.

Thanks for your solution. I have applied the same and it works for me.

alanrené’s picture

Thanks for your solution. I have applied too and it's ok

kalaiselvann’s picture

It is working fine for Drupal 8.6.10

nikhitarathore’s picture

Hi Moshk,
      This solution is works for me.. Thanks

davidjimenez75’s picture

SOLVED: Drupal v8.7.6 - XAMPP 7.3.7 Windows 10 

Modify this 2 files:

FILE 1=\sites\default\default.settings.php
// Add to the first line

ini_set('max_execution_time', 0);

FILE 2=\core\lib\Drupal\Core\Database\Statement.php
// Add under namespace

namespace Drupal\Core\Database;
ini_set('max_execution_time', 0);


Installation works OK for me after this.
vani.S’s picture

It is working fine. Thanks!!

alex.bu’s picture

Perfect! Thanks!

rosario_dl’s picture

Thanks! it function for the version 8.8.2

maxmiles’s picture

Thanks for this case!