在尝试将安装在Windows 8上的WampServer上的小型sql文件导入phpmyadmin时,它会继续加载。我收到以下错误
Fatal error: Maximum execution time of 300 seconds exceeded in D:\wamp\apps\phpmyadmin4.0.4\libraries\dbi\mysqli.dbi.lib.php on line 267
我在下面列出了错误日志。
[Mon Mar 17 19:03:20.009137 2014] [:error] [pid 5160:tid 1672] [client ::1:55653] PHP Fatal error: Maximum execution time of 300 seconds exceeded in D:\\wamp\\apps\\phpmyadmin4.0.4\\libraries\\dbi\\mysqli.dbi.lib.php on line 267, referer: http://localhost/phpmyadmin/import.php
[Mon Mar 17 19:03:20.009137 2014] [:error] [pid 5160:tid 1672] [client ::1:55653] PHP Stack trace:, referer: http://localhost/phpmyadmin/import.php
[Mon Mar 17 19:03:20.009137 2014] [:error] [pid 5160:tid 1672] [client ::1:55653] PHP 1. {main}() D:\\wamp\\apps\\phpmyadmin4.0.4\\import.php:0, referer: http://localhost/phpmyadmin/import.php
[Mon Mar 17 19:03:20.009137 2014] [:error] [pid 5160:tid 1672] [client ::1:55653] PHP 2. ImportSql->doImport() D:\\wamp\\apps\\phpmyadmin4.0.4\\import.php:489, referer: http://localhost/phpmyadmin/import.php
[Mon Mar 17 19:03:20.009137 2014] [:error] [pid 5160:tid 1672] [client ::1:55653] PHP 3. PMA_importRunQuery() D:\\wamp\\apps\\phpmyadmin4.0.4\\libraries\\plugins\\import\\ImportSql.class.php:414, referer: http://localhost/phpmyadmin/import.php
[Mon Mar 17 19:03:20.009137 2014] [:error] [pid 5160:tid 1672] [client ::1:55653] PHP 4. PMA_DBI_try_query() D:\\wamp\\apps\\phpmyadmin4.0.4\\libraries\\import.lib.php:158, referer: http://localhost/phpmyadmin/import.php
[Mon Mar 17 19:03:20.010143 2014] [:error] [pid 5160:tid 1672] [client ::1:55653] PHP 5. PMA_DBI_real_query() D:\\wamp\\apps\\phpmyadmin4.0.4\\libraries\\database_interface.lib.php:192, referer: http://localhost/phpmyadmin/import.php
[Mon Mar 17 19:09:23.798129 2014] [:error] [pid 5160:tid 1672] [client ::1:55969] PHP Fatal error: Maximum execution time of 300 seconds exceeded in D:\\wamp\\apps\\phpmyadmin4.0.4\\libraries\\dbi\\mysqli.dbi.lib.php on line 267, referer: http://localhost/phpmyadmin/import.php
[Mon Mar 17 19:09:23.798129 2014] [:error] [pid 5160:tid 1672] [client ::1:55969] PHP Stack trace:, referer: http://localhost/phpmyadmin/import.php
[Mon Mar 17 19:09:23.798129 2014] [:error] [pid 5160:tid 1672] [client ::1:55969] PHP 1. {main}() D:\\wamp\\apps\\phpmyadmin4.0.4\\import.php:0, referer: http://localhost/phpmyadmin/import.php
[Mon Mar 17 19:09:23.798129 2014] [:error] [pid 5160:tid 1672] [client ::1:55969] PHP 2. ImportSql->doImport() D:\\wamp\\apps\\phpmyadmin4.0.4\\import.php:489, referer: http://localhost/phpmyadmin/import.php
[Mon Mar 17 19:09:23.798129 2014] [:error] [pid 5160:tid 1672] [client ::1:55969] PHP 3. PMA_importRunQuery() D:\\wamp\\apps\\phpmyadmin4.0.4\\libraries\\plugins\\import\\ImportSql.class.php:414, referer: http://localhost/phpmyadmin/import.php
[Mon Mar 17 19:09:23.798129 2014] [:error] [pid 5160:tid 1672] [client ::1:55969] PHP 4. PMA_DBI_try_query() D:\\wamp\\apps\\phpmyadmin4.0.4\\libraries\\import.lib.php:158, referer: http://localhost/phpmyadmin/import.php
[Mon Mar 17 19:09:23.798129 2014] [:error] [pid 5160:tid 1672] [client ::1:55969] PHP 5. PMA_DBI_real_query() D:\\wamp\\apps\\phpmyadmin4.0.4\\libraries\\database_interface.lib.php:192, referer: http://localhost/phpmyadmin/import.php
答案 0 :(得分:1)
当然,原因是phpMyAdmin是一个php应用程序,因此受到php.ini中max_execution_time
的限制
解决方案1 是更改你的php.ini文件并像这样增加exec时间
max_execution_time = 2000
解决方案2 只会增加phpMyAdmin应用的时间
编辑\ wamp \ alias \ phpmyadmin.conf并在Alias /phpmyadmin .....
行之后将这些行添加到该文件
php_admin_value max_execution_time 2000
php_admin_value max_input_time 2000
解决方案3. 我想恢复大型数据库转储的最佳解决方案是使用MySQL Console
,因为这不受任何限制,只会运行直到您的备份文件为止完全处理过。
左键单击wampmanager图标 - > MySQL - > MySQL控制台 输入你的' root'密码或只需按Enter键即表示您没有密码' root'用户ID。
然后输入此命令作为mysql >
提示
source path/to/the/backup/file.sql
如果选择选项1或2,请不要忘记将max_execution_time
设置回不超过60秒。如果你犯了错误(我们都不是完美的)在PHP代码中编写无限循环,PHP代码将在发出错误之前运行max_execution_time
。如果它运行2000/60 = 33.5分钟,在您找到错误的线索之前,这可能会非常混乱。