Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.?

like image 858
Mr world wide Avatar asked Sep 12 '17 11:09

Mr world wide


4 Answers

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
like image 160
Tejashwi Kalp Taru Avatar answered Nov 05 '22 15:11

Tejashwi Kalp Taru


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

like image 38
user1 Avatar answered Nov 05 '22 16:11

user1


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

like image 10
Khem Raj Regmi Avatar answered Nov 05 '22 14:11

Khem Raj Regmi


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.

like image 7
Daminda Herath Avatar answered Nov 05 '22 16:11

Daminda Herath