I am trying to export a large database via phpMyAdmin. I jeep getting an error that the script stopped because the maximum execution time of 600 seconds was reached (or something like that). I tried setting max_execution_time in php.ini to 0 and -1. The change takes effect as I can see it in phpinfo(), but I am still getting the error. Another strang thing is that originally (before I changed it to 0) it wasn't 600 either. It was 180! Where is this 600 set?
-
Have you restarted apache (just throwing idea)?Leri– Leri2012-06-27 11:41:34 +00:00Commented Jun 27, 2012 at 11:41
-
Could be the timeout setting on your webserverMark Baker– Mark Baker2012-06-27 11:41:52 +00:00Commented Jun 27, 2012 at 11:41
-
1are you sure you are changing the correct php.ini?Nicholas King– Nicholas King2012-06-27 11:43:52 +00:00Commented Jun 27, 2012 at 11:43
-
1Why you don's use mysqldump?CodeZombie– CodeZombie2012-06-27 11:44:36 +00:00Commented Jun 27, 2012 at 11:44
-
@NicholasKing Like I said, I see the changes in phpinfo(), so they are taking effect.Baruch– Baruch2012-06-27 11:47:51 +00:00Commented Jun 27, 2012 at 11:47
2 Answers
Your web server can have other timeout configurations that may also interrupt PHP execution. Apache has a Timeout directive and IIS has a CGI timeout function. See your web server documentation for specific details.
Don't use phpMyAdmin to import large files. Try using the mysql CLI to import a dump of your DB. Transfer the SQL file to the server and execute the following on the server using PHP script like shell_exec or system
mysql --user=user --password=password database < database_dump.sql.
Of course the database has to exist, and the user you provide should have the necessary privilege(s) to update the database.