Fatal error: Maximum execution exceeded

99封情书 提交于 2019-12-05 01:37:53

问题


I am trying to import a large database into my WAMP 2.5 server phpmyadmin. After importing some tables an error occurs:

Fatal error: Maximum execution time of 360 seconds exceeded in C:\wamp\apps\phpmyadmin4.1.14\libraries\dbi\DBIMysqli.class.php on line 285

and the importing process is stopped. I have already increased max_execution_time in my php.ini file. Can anyone help me resolve this problem?


回答1:


Don't modify the php.ini file !

Modify the alias of the phpMyAdmin file : J:\wamp\alias\phpmyadmin.conf

Before the line </Directory>, you can describe what you want :

php_admin_value upload_max_filesize 128M
  php_admin_value post_max_size 128M
  php_admin_value max_execution_time 360
  php_admin_value max_input_time 360
</Directory>

You can change the values of time or size as you want.




回答2:


You can also forget about phpMyAdmin completely and use the mysql console

Using the wampmanager icon menus do the following :-

left click wampmanager -> MySQL -> MySQL Console

If you have changed the password for the root userid enter that when challenged or if you have not changed it just hit enter.

Make sure there is a USE databasename in the backup file, if not enter it manually now and then use the source command to run the restore from your backup file.

i.e.

USE YourDatabase;
SOURCE C:/path/to/backup/file.sql;

Note the use of UNIX directory seperators even though you are on windows.

This tool has no time limitations as its not a PHP script, and will run to the end of your backup with no issues.




回答3:


Although strongly not recommended, you can remove the maximum script run-time restriction by setting max_execution_time to zero:

http://php.net/manual/en/info.configuration.php#ini.max-execution-time

If there's a more reliable way for you to get the file onto the server (SFTP?) I would suggest you try that first.



来源:https://stackoverflow.com/questions/24936314/fatal-error-maximum-execution-exceeded

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!