How to Fix Script Timeout Error in phpMyAdmin?

11,479

Solution 1

Since you get script time out, shouldn't you increase the max_execution_time in php.ini instead of reducing it?

Try with the following values:

post_max_size = 500M
upload_max_filesize = 500M
max_execution_time = 300
max_input_time = 540
memory_limit = 1000M

EDIT: just noticed that max_execution_time is hardcoded to 0, still you can try the above settings.

Solution 2

Please be aware that apache also has an execution time.

Apache Wait Time for Input/Output
Edit file C:\WampDeveloper\Config\Apache\extra\httpd-default.conf
Timeout = 300

Solution 3

This issue commonly arise when we working on heavy load php application. This error comes when you are getting bulk of data from database. Then this type of issue come. You should check the following things in you code.

  • Check you database queries properly.
  • With Select statement you should use the Limit offset.
  • Check each table should have the primary key.

This issue also come when we are upload images or some thing like wise. Some time we did get solution for the heavy load image's then we try to change the logic and try to solve the issue. One more thing that you should check you php.ini configuration setting Increase these values in MB.As follows.

post_max_size = 500M
upload_max_filesize = 500M
max_execution_time = 300
max_input_time = 540
memory_limit = 1000M
Share:
11,479
aniskhan001
Author by

aniskhan001

Working with: Go, Docker, Kubernetes, Prometheus, EFK, etc.

Updated on August 01, 2022

Comments

  • aniskhan001
    aniskhan001 almost 2 years

    I am getting script timeout issue while importing a database from a zip. The error shows as-

    Script timeout passed, if you want to finish import, please resubmit same file and import will resume.

    I tried setting $cfg['ExecTimeLimit'] = 0; inside phpmyadmin4.1.14/libraries/config.default.php. Also inside my php.ini I set both max_input_time and max_execution_time to 0.

    The zip size is around 33 MB and I'm using WAMP server.
    What could be the other cases for which I'm getting this error?

    • Rimble
      Rimble almost 9 years
      Have you made sure to restart the apache service on wamp?
    • aniskhan001
      aniskhan001 almost 9 years
      yes, several times. Been stuck with this issue from yesterday!
    • Rimble
      Rimble almost 9 years
      Try setting it in phpmyadmin4.1.14/libraries/config.inc.php instead of the .default.php one.
    • aniskhan001
      aniskhan001 almost 9 years
      Tried that too with no luck! :(
    • Rimble
      Rimble almost 9 years
      Make a phpinfo file and check which files are loaded to be sure. Check to make sure the max_execution time etc are actually 0 on that page.
    • hafid id-baha
      hafid id-baha almost 3 years
      please refer to this answer it helped me stackoverflow.com/a/29938630/15625279
  • aniskhan001
    aniskhan001 almost 9 years
    I tried these settings, but still having the same error.
  • Sotiris Kiritsis
    Sotiris Kiritsis almost 9 years
    Did you restart your server after the changes to php.ini ?
  • aniskhan001
    aniskhan001 almost 9 years
    Yes, restarted few times, even tried increasing max_execution_time to 6000.
  • Sotiris Kiritsis
    Sotiris Kiritsis almost 9 years
    Something else i found out is that Apache uses a file called \wamp\bin\php\php{version}\phpForApache.ini to get its php.ini file setting from. This is the file that should be edited.