I am trying to upload a big database of size 21 MB using phpmyadmin (import) but after sometime it is giving this error Fatal error: Maximum execution time of 300 seconds exceeded Now it self explaintory, so what shoud I do ? I am using Xampp on my local system and I think I can only use phpmyadmin to load the DB
Thats your PHP script timeout. If you do not have access to configure PHP on this machine, then you need to work around it. One suggestion I have is that you could import the tables one by one, these are likely to be much smaller in size and so shouldn't exceed your timeout. If you have shell access its much easier, you can just upload the file and import it using the mysql command line client.
I am on my local windows desktop and have access to all the files. Can u tell me which file shud I edit to increase the timeout ?
In php.ini the variable name is max_execution_time Since its on local computer, the best way to do it is mysql import < your.sql By doing so you won't have to play around with php.ini file and it is better to have shorter execution time in production environment!
actually I am getting error in some other file so php.ini suggestion didn't worked and I can't find anything similar to 300 in line 69 of concerned file
It is complaining because around line 69, php is processing bunch of information which it is not able to finish in alloted 300 seconds of time. That's why ,it says fatal error and there is nothing wrong in the sql.php of phpMyAdmin. It is doing its job but the job is taking longer than alloted time! If you don't have the max execution time variable in php.ini then create one as: and be sure to restart your server else changes won't take into effect!
if you work local then just use a real database programm with an import function (navicat, sqlyog or even mysql via command line).
Look here: pereblog.ru/2009/05/fatal-error-maximum-execution-time-of-300-seconds-exceeded/ You must edit config.inc.php, in phpmyadmin folder
EN : In case you don't know how to read russian, the web page given by asokr says that you should add this line to phpMyAdmin\config.inc.php (where "0" means "no limit") : $ Cfg ['ExecTimeLimit'] = 0; It also says that BigDump Importer (www.ozerov.de/bigdump.php) can be helpful in some case. --- FR : Au cas où vous ne sauriez pas lire le russe, la page donnée par asokr dit qu'il faut ajouter la ligne suivante au fichier phpMyAdmin\config.inc.php (dans laquelle "0" signifie "aucune limite") : $ Cfg ['ExecTimeLimit'] = 0; Ça dit aussi que BigDump Importer (www.ozerov.de/bigdump.php) peut être d'une bonne aide pour régler certains cas de figures. Have a nice day/Bonne journée
just go to the folder where you installed waamp and you will find the php.ini in there. Edit it and increase max execution time .. simple
Raising scripts execution time is not a good idea, it should be as low as possible to prevent too much resources consumption due to DoS attacks. Any hosting providers provide SSH access, so the best way to import database is to upload dump to a server and import using a shell command: mysql --user=username --password=password dbname < dump.sql Code (markup):