Script timeout passed, if you want to finish import, please resubmit the same file and import will resume
Asked Answered
U

12

63

I have a database Un-zipped size 50mb zipped size 7mb So when I try to import the database zipped(7mb) after few minutes it is throwing this error:

Script timeout passed, if you want to finish import, please resubmit the same file and import will resume.

I have resubmitted it but still not importing total data.

I am working in local and these are my php.ini configurations:

max_execution_time = 3000000 
max_input_time = 60000000000000
memory_limit = 1280000000000000000000M
post_max_size = 4096456M
upload_max_filesize = 40964564M
max_file_uploads = 200

how can I let the system to take its own time for import.?

Unwish answered 12/9, 2017 at 11:37 Comment(0)
L
142

If you are importing your database using Phpmyadmin, then there's a configuration file for it. The default/example config file is found here:

\phpmyadmin\libraries\config.default.php

Don't edit this file as it may get overwritten in future updates. Instead look for an existing file here:

\phpmyadmin\config.inc.php

...and if it does not exist, create it.

Open this configuration file in any editor and change $cfg['ExecTimeLimit'] = 300; to $cfg['ExecTimeLimit'] = 0;

(or if it does not exist, add it)

Restart your localhost, now you don't have any time limit.

Or you can use MySQL command line to import your unzipped SQL file directly, something like below:

mysql -u username -p database_name < my_unzipped_import_file.sql
Luncheonette answered 12/9, 2017 at 11:41 Comment(4)
What do you mean by restarting localhost ? apache server ? or mysql server ? thanksBrauer
If you are going to change Phpmyadmin config, then you don't have to restart anything. @BrauerLuncheonette
I am using AWS server, where I can get the config.default.php fiel?Hauteur
Thank you, i use Open Server Panel, my path: C:\OpenServer\modules\system\html\openserver\phpmyadmin\libraries\config.default.phpYungyunick
G
16

Go to xampp/phpMyAdmin/libraries/config.default.php find $cfg['ExecTimeLimit'] = 300; line no 695 and replace $cfg['ExecTimeLimit'] = 0;

Galloon answered 1/11, 2017 at 4:12 Comment(0)
T
11

Instead of XAMPP you may use LAMP(Linux Apache MySQL PHP) mostly. Using LAMP you may also face this problem.

In my case(using Ubuntu 15.10), I had configured/set post_max_size, upload_max_filesize, max_execution_time, max_input_time, memory_limit following my needs using php.ini file which is located at /etc/php5/apache2/php.ini

But still I was faced this problem. Then solved the problem using config.default.php file, where you can find out like this line below:

$cfg['ExecTimeLimit'] = 300; Make it to

$cfg['ExecTimeLimit'] = 0;

Note: You can locate config.default.php file via your terminal(Ctrl+Alt+T) by this commandlocate config.default.php possible path is /usr/share/phpmyadmin/libraries/config.default.php

Torques answered 13/11, 2017 at 4:55 Comment(0)
F
8

You need to change

$cfg['ExecTimeLimit'] = 300;

to

$cfg['ExecTimeLimit'] = 0;

in your config.php file located by default in \phpmyadmin\libraries\config.default.php

Restart your localhost.

It will definitely work. Enjoy.

Fleur answered 1/8, 2021 at 12:41 Comment(0)
C
7

Xampp in Ubuntu

If you are importing your database using PhpMyAdmin, then there's a configuration file for it:

/opt/lampp/phpmyadmin/libraries/config.default.php

Open this configuration file in any editor and change $cfg['ExecTimeLimit'] = 300; to $cfg['ExecTimeLimit'] = 0;

Restart your localhost, now you don't have any time limit.

Carissacarita answered 1/11, 2017 at 4:44 Comment(0)
V
4

WampServer Version 3 - Windows

Open config.default.php

You can find it here

C:\wamp\apps\phpmyadmin\libraries\config.default.php

Search for ExecTimeLimit

/**
 * maximum execution time in seconds (0 for no limit)
 *
 * @global integer $cfg['ExecTimeLimit']
 */
$cfg['ExecTimeLimit'] = 300;

increase the value of $cfg['ExecTimeLimit'] or set it to 0 for no limit

Villarreal answered 28/3, 2019 at 15:3 Comment(0)
M
3

in

config.inc.php

add this

$cfg['ExecTimeLimit'] = 0;

for me is work

Millicent answered 11/6, 2019 at 1:31 Comment(0)
V
2

MAC OS MAMP

edit this file

/Applications/MAMP/./bin/phpMyAdmin/config.inc.php

and dont forget restart MAMP

Vennieveno answered 28/11, 2020 at 22:22 Comment(0)
M
1

for lamp ubuntu :- first go to config.default.php location you can find by execute

locate config.default.php

in my case its locate at /usr/share/phpmyadmin/libraries

cd /usr/share/phpmyadmin/libraries

now edit config.default.php file in my case i use gedit you can install by

sudo apt install gedit

sudo gedit config.default.php

no search for ExecTimeLimit in file change $cfg['ExecTimeLimit'] = 300; to

$cfg['ExecTimeLimit'] = 0; 

save and close it, restart server by

sudo service apache2 restart
Marijane answered 14/6, 2020 at 19:31 Comment(0)
I
1

This way will work with Windows OS + WAMP server


You can directly import .sql file via MySQL server by calling it from your CMD at this path C:\wamp64\bin\mysql\mysql{version}\bin

1- Open your CMD
2- cd C:\wamp64\bin\mysql\mysql{version}\bin
3- mysql -u root -p < {/path/to/your/sql/file/.sql}

This way didn't have a limitation on execution time compared to phpMyAdmin.

Intuitional answered 26/7, 2021 at 6:12 Comment(0)
C
0

If you are importing your database using Phpmyadmin, then there's a configuration file for it: \phpmyadmin\libraries\config.default.php

The way it is described in the accepted answer by @Tejashwi Kalp Taru has it's flaws.

@Gibran Dimasagung mentioned the correct way, by editing

config.inc.php

as the header of the config.default.php file cleary states following:

DO NOT EDIT THIS FILE, EDIT config.inc.php INSTEAD !!! phpMyAdmin default configuration, you can copy values from here to your config.inc.php

It's likely that all changes applied to config.default.php will be lost after an update.

Cochlea answered 7/6, 2022 at 12:21 Comment(1)
If you feel one answer is better than another you should upvote the one that helped you. When you have enough rep you will also be able to comment and downvote accordingly. In the mean time, you can suggest an edit to the helpful answer which adds the extra details you mentioned.Sufi
A
0

If you're using a docker image like phpmyadmin/phpmyadmin for instance, you can achieve do this:

  1. Bash into your docker image: docker exec -it the-name-of-your-image bash
  2. cd /etc/phpmyadmin, then you will see a file name config.inc.php
  3. open the file with nano or vim (You will have to install them in the container if you haven't)
  4. Scroll down and check, you'll see this line: if (isset($_ENV['MAX_EXECUTION_TIME'])) { $cfg['ExecTimeLimit'] = $_ENV['EXEC_TIME_LIMIT']; }
  5. change $cfg['ExecTimeLimit'] = $_ENV['EXEC_TIME_LIMIT']; to $cfg['ExecTimeLimit'] = 0; as suggested above.
  6. Save, exit and restart your image. You should be fine
Aesculapian answered 2/7, 2023 at 14:52 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.