How to prevent script timeout in phpMyAdmin

« Back :: Tagged with Databases :: HowTo's :: Migrating :: phpMyAdmin :: Snippets :: XAMPP ::

This is how to prevent phpMyAdmin from timing out when importing an sql file.

I use XAMPP, and each time I was trying to import a large sql file, or a gzip file for that matter, phpMyAdmin threw a timeout error in my face.

After some investigation I came to this simple solution; In the file config.inc.php which is in your phpMyAdmin's install dir, you put the snippet below:

/**
 * Set script timout in seconds
 * 0 = unlimited
 */
$cfg['ExecTimeLimit'] = 0; /* no script timeout */

Before:

Fatal error: Maximum execution time of 300 seconds exceeded in
C:\xampp\phpMyAdmin\libraries\import\sql.php on line 129

After:

Import has been successfully finished, 33211 queries executed.

:)

Comments

Anonymous @ November 17th, 2010 - 03:00

works as advertised

Import has been successfully finished, 5749 queries executed!

Anonymous (not verified) @ April 7th, 2013 - 11:14

Can you plz tell me how much time it is taking for execute?

deuxcode @ April 10th, 2013 - 07:30

It depends on how big your import file is and on your computer performance. It can take quite a while actually.

Anonymous @ March 6th, 2011 - 20:51

Thx for the tip! I'm trying to import a 465mb sql file and I keep getting a timeout message even if the file is gzipped in to a 26 mb archive.

Anonymous (not verified) @ June 8th, 2012 - 13:51

I can now see the progress even thought its not done.Thanx

Jose Philip Raja (not verified) @ July 2nd, 2012 - 13:02

Import has been successfully finished, 31102 queries executed. ()

Chris Vickers (not verified) @ July 10th, 2012 - 12:11

Works Perfectly. Really useful tip

Rosalyn (not verified) @ March 27th, 2014 - 02:29

My brother recommended I might like this web site.
He was totally right. This post truly made my day. You cann't imagine just how
much time I had spent for this information!

Thanks!

Anon001 (not verified) @ April 22nd, 2013 - 12:13

Thanks! Saved my day!

Anonymous (not verified) @ May 23rd, 2013 - 02:11

Thank you very much.
Very usefull tip.
;)

Anonymous (not verified) @ August 22nd, 2013 - 12:15

Worked perfectly, thank you very much!

Rem (not verified) @ December 15th, 2013 - 07:48

Thanks for the snippet. I added it to my config.inc file right before the closing ?> tag and it worked great.

Nick Goodey (not verified) @ April 4th, 2014 - 02:02

Worked great importing a 26MB Moodle backup

Thanks from Lincoln University

Ash (not verified) @ April 18th, 2014 - 16:28

Alhamdulillah!
Hey you saved my day and work! thank you very much!

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <blockquote> <blockcode> <pre> <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Copyright © 2010 deuxcode.com
Powered by Drupal. Valid XHTML 1.0 Strict and CSS 2.1.