它在试图将即使是较小的sql文件导入到安装在Windows8上的WampServer上的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发布于 2014-03-18 10:10:44
当然,原因是phpMyAdmin是一个php应用程序,因此受到php.ini中的max_execution_time的限制。
解决方案1是更改php.ini文件并增加执行时间,如下所示
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 Console,输入您的“root”密码,或者单击Enter就可以在'root‘用户is上没有密码。
然后输入此命令作为mysql >提示符
source path/to/the/backup/file.sql如果选择1或2,不要忘记将max_execution_time设置为不超过60秒。如果您曾经犯过用PHP代码编写无限循环的错误(我们中没有人是完美的),那么PHP代码将在给出错误之前为max_execution_time运行。如果在给出错误提示之前运行2000/60 = 33.5分钟,这可能会非常混乱。
https://stackoverflow.com/questions/22456064
复制相似问题