php 脚本超时,如果您想完成导入,请重新提交相同的文件,导入将继续
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/46175390/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Script timeout passed, if you want to finish import, please resubmit the same file and import will resume
提问by Mr world wide
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:
我有一个数据库 Un-zipped size50mb
压缩大小7mb
所以当我尝试在几分钟后导入压缩的数据库(7mb) 时,它会抛出这个错误:
Script timeout passed, if you want to finish import, please resubmitthe 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:
我在本地工作,这些是我的 php.ini 配置:
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.?
我怎样才能让系统花自己的时间进行导入。?
回答by Tejashwi Kalp Taru
If you are importing your database using Phpmyadmin, then there's a configuration file for it:
如果您使用 Phpmyadmin 导入数据库,则有一个配置文件:
\phpmyadmin\libraries\config.default.php
Open this configuration file in any editor and change $cfg['ExecTimeLimit'] = 300;
to $cfg['ExecTimeLimit'] = 0;
在任何编辑器中打开此配置文件并更改$cfg['ExecTimeLimit'] = 300;
为$cfg['ExecTimeLimit'] = 0;
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 命令行直接导入解压后的 SQL 文件,如下所示:
mysql -u username -p database_name < my_unzipped_import_file.sql
回答by khem raj regmi
Instead of XAMPP you may use LAMP(Linux Apache MySQL PHP) mostly. Using LAMP you may also face this problem.
您可以主要使用 LAMP(Linux Apache MySQL PHP)代替 XAMPP。使用 LAMP 您也可能会遇到这个问题。
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
在我的情况下(使用 Ubuntu 15.10),我使用位于/etc/php5/apache2/php.ini 的php.ini 文件根据我的需要配置/设置 post_max_size、upload_max_filesize、max_execution_time、max_input_time、memory_limit
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:
但我仍然面临这个问题。然后使用 config.default.php 文件解决了这个问题,你可以在下面找到这一行:
$cfg['ExecTimeLimit'] = 300;Make it to
$cfg['ExecTimeLimit'] = 300; 使它成为
$cfg['ExecTimeLimit'] = 0;
$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
注意:您可以通过终端(Ctrl+Alt+T)通过这个命令locate config.default.php 找到config.default.php 文件,可能的路径是/usr/share/phpmyadmin/libraries/config.default.php
回答by user1
Go to xampp/phpMyAdmin/libraries/config.default.php
find $cfg['ExecTimeLimit'] = 300;
line no 695 and replace $cfg['ExecTimeLimit'] = 0;
转到 xampp/phpMyAdmin/libraries/config.default.php 找到$cfg['ExecTimeLimit'] = 300;
第 695 行并替换$cfg['ExecTimeLimit'] = 0;
回答by Daminda Herath
Xampp in Ubuntu
Ubuntu 中的 Xampp
If you are importing your database using PhpMyAdmin
, then there's a configuration file for it:
如果您使用 导入数据库PhpMyAdmin
,则有一个配置文件:
/opt/lampp/phpmyadmin/librariesconfig.default.php
/opt/lampp/phpmyadmin/librariesconfig.default.php
Open this configuration file in any editor and change $cfg['ExecTimeLimit'] = 300; to $cfg['ExecTimeLimit'] = 0;
在任何编辑器中打开此配置文件并更改 $cfg['ExecTimeLimit'] = 300; 到 $cfg['ExecTimeLimit'] = 0;
Restart your localhost, now you don't have any time limit.
重新启动您的本地主机,现在您没有任何时间限制。
回答by chebaby
WampServer Version 3 - Windows
WampServer 版本 3 - Windows
Open config.default.php
打开config.default.php
You can find it here
你可以在这里找到它
C:\wamp\apps\phpmyadmin\libraries\config.default.php
Search for ExecTimeLimit
搜索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 0for no limit
增加$cfg['ExecTimeLimit'] 的值或将其设置为0表示没有限制
回答by Gibran Dimasagung
in
在
config.inc.php
add this
添加这个
$cfg['ExecTimeLimit'] = 0;
for me is work
对我来说就是工作