1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Fatal error: Maximum execution time of 300 seconds exceeded

Discussion in 'MySQL' started by poseidon, May 25, 2007.

  1. #1
    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
    poseidon, May 25, 2007 IP
  2. turiel

    turiel Peon

    Messages:
    148
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    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.
    turiel, May 25, 2007 IP
  3. poseidon

    poseidon Banned

    Messages:
    4,356
    Likes Received:
    246
    Best Answers:
    0
    Trophy Points:
    0
    #3
    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 ?
    poseidon, May 25, 2007 IP
  4. turiel

    turiel Peon

    Messages:
    148
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #4
    The file is "php.ini". I don't know where its located exactly on the windows version.
    turiel, May 25, 2007 IP
  5. ketan9

    ketan9 Active Member

    Messages:
    548
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    58
    #5
    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!
    ketan9, May 25, 2007 IP
  6. poseidon

    poseidon Banned

    Messages:
    4,356
    Likes Received:
    246
    Best Answers:
    0
    Trophy Points:
    0
    #6
    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
    poseidon, May 25, 2007 IP
  7. ketan9

    ketan9 Active Member

    Messages:
    548
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    58
    #7
    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!
    ketan9, May 25, 2007 IP
  8. falcondriver

    falcondriver Active Member

    Messages:
    963
    Likes Received:
    47
    Best Answers:
    0
    Trophy Points:
    70
    #8
    if you work local then just use a real database programm with an import function (navicat, sqlyog or even mysql via command line).
    falcondriver, May 26, 2007 IP
  9. asokr

    asokr Active Member

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    66
    #9
    Look here:
    pereblog.ru/2009/05/fatal-error-maximum-execution-time-of-300-seconds-exceeded/
    You must edit config.inc.php, in phpmyadmin folder
    asokr, Jun 6, 2010 IP
  10. grafik.muzik

    grafik.muzik Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    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 :D
    grafik.muzik, Dec 12, 2010 IP