Fatal error: Maximum execution time of 30 seconds exceeded

后端 未结 16 756
逝去的感伤
逝去的感伤 2020-11-22 01:27

I am downloading a JSON file from an online source and and when it runs through the loop I am getting this error:

Fatal error: Maximum execution time

相关标签:
16条回答
  • 2020-11-22 01:46

    Increase your script execution time by adding the following line at top of the PHP script.

    ini_set('max_execution_time', 120); //120 seconds = 2 minutes
    

    Reference has taken from Increase the PHP Script Execution Time

    0 讨论(0)
  • 2020-11-22 01:50

    Your loop might be endless. If it is not, you could extend the maximum execution time like this:

    ini_set('max_execution_time', 300); //300 seconds = 5 minutes

    and

    set_time_limit(300);
    

    can be used to temporarily extend the time limit.

    0 讨论(0)
  • 2020-11-22 01:53

    You can do it easily with WHM. Just got to:

    WHM -> Service Configuration -> PHP configuration

    editor-> max_execution_time=30

    ( 30 is default change it to whatever value u want)

    0 讨论(0)
  • 2020-11-22 01:55

    Maybe check for any thing that you have changed under the php.ini file. For example I changed the ";intl.default_locale =" to ";intl.default_locale = en_utf8" in order to enable the "Internationalization extension (Intl)" without adding the "extension=php_intl.dll" then this same error occurred. So I suggest to check for similar mistakes.

    0 讨论(0)
提交回复
热议问题