41

I just installed WampServer. It works when I visit my project page but when I try to navigate phpMyAdmin i get this error:

Maximum execution time of 360 seconds exceeded

What is the problem?

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
Kvasir
  • 1,197
  • 4
  • 17
  • 31

3 Answers3

98

A better solution here is to change the config that controls phpMyAdmin and not the php.ini file.

If you change the php.ini file you effect everything in PHP and should you write that infinite loop that we all do from time to time it will take longer to terminate your infinite loop than is sensible.

Note: If you are using the 64bit WAMPServer the base folder name will be wamp64 instead of wamp so please amend the below folder names accordingly.

So change \wamp\alias\phpmyadmin.conf. By default it will look something like this although your version of phpMyAdmin will probably be different:

Alias /phpmyadmin "c:/wamp/apps/phpmyadmin4.1.14/"

<Directory "c:/wamp/apps/phpmyadmin4.1.14/">
   Options Indexes FollowSymLinks MultiViews
   AllowOverride all
  <IfDefine APACHE24>
    Require local
  </IfDefine>
  <IfDefine !APACHE24>
    Order Deny,Allow
      Deny from all
      Allow from localhost ::1 127.0.0.1
    </IfDefine>
  php_admin_value upload_max_filesize 128M
  php_admin_value post_max_size 128M
  php_admin_value max_execution_time 360
  php_admin_value max_input_time 360
</Directory>

To extend the maximum time limit for importing a database, change the php_admin_value max_execution_time parameter. You may also need to change the other parameters as larger databases tend to come in larger files and take longer to read as well. Example:

  php_admin_value upload_max_filesize 1024M
  php_admin_value post_max_size 1024M
  php_admin_value max_execution_time 1800
  php_admin_value max_input_time 1800

Don't forget to restart Apache after making changes to this file.

Simon East
  • 55,742
  • 17
  • 139
  • 133
RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
  • 2
    Don't forget to reset your WAMP server after changing it if you're like me. Took me good 5 minutes of cursing at the stupid answer on SO that doesn't work before I realized I was the stupid one. – Eric Mar 31 '16 at 06:13
  • that file simply doesn't exists on my machine (MySQL 5.5 on Win64). – Power Engineering Mar 17 '18 at 15:56
  • @PowerEngineering Hi, are you using WAMPServer or some other mecanism of installing a WAMP Stack? – RiggsFolly Mar 17 '18 at 20:07
  • @RiggsFolly. No WAMP, just MySQL 5.5 64bit installed on plain Windows Server2012 R2 64bit Datacenter Edition. The same for the Web Server (DB is on a different machine) but with Apache and PHP 5.5.12. I solved the problem placing into phpmyadmin config.inc.php the following: $cfg['ExecTimeLimit'] = secondsToTimeout; – Power Engineering Mar 18 '18 at 12:18
  • @PowerEngineering Hi, thanks for the info, but in that case your config is not WAMPServer and therefore your solution is bound to be different. – RiggsFolly Mar 18 '18 at 16:06
11

In your php/php.ini change max_execution_time = 360 to 99999.

OR

You can add ini_set('max_execution_time', 600); //600 seconds = 10 minutes line on top of your php file.

See, if that works.

Gaurav Dave
  • 6,838
  • 9
  • 25
  • 39
1

What helped me is to edit config.inc.php in phpmyadmin folder and changed:

$cfg['Servers'][$i]['host'] = 'localhost'; 

to

$cfg['Servers'][$i]['host'] = '127.0.0.1'; 

Basically change "localhost" to "127.0.0.1", xampp and wampp differently resolve those two.

FosAvance
  • 2,363
  • 9
  • 36
  • 52