0

For some time I have been getting a "Maximum execution time of 30 seconds exceeded" while trying to update different WP installations on my local server.

I know I can fix this by disabling it in the php.ini.. but what I want to do is find the problem and fix it generally. It's a local server after all, so this action should take just few seconds of time.

My local server is running on XAMPP.

The exact message from the WP admin:

Downloading update from http://wordpress.org/wordpress-3.5-new-bundled.zip

Fatal error: Maximum execution time of 30 seconds exceeded in E:\Local Server\htdocs\test wp\wp-includes\class-http.php on line 949

NotMe
  • 87,343
  • 27
  • 171
  • 245
  • possible duplicate of [Fatal error: Maximum execution time of 30 seconds exceeded](http://stackoverflow.com/questions/5164930/fatal-error-maximum-execution-time-of-30-seconds-exceeded) – KarSho Jan 29 '15 at 07:47

3 Answers3

4

to temporarily increase your max execution time you can use ini_set() in your php page

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

otherwise you'll need to do it in php.ini

max_execution_time = 30

Change the value (in seconds) or set to 0 for infinite time and restart Apache for the setting to take effect.

keeg
  • 3,990
  • 8
  • 49
  • 97
  • 1
    Thanks for your reply, but as I said above - it's not extending or disabling the "max_execution_time" what I want to do.. I just want to find out the problem. Probably infinite loop somewhere on the core WP scripts? I can't think of another reason at this time. –  Jan 13 '13 at 19:56
  • 1
    so then you are trying to find out what is taking long to execute... the error is pretty obvious its taking a long time for the file to download, although you are on a local server you are downloading an external file which is 5.2 megs, so if you are on a slow connection, its possible that it would take longer than 30 seconds... – keeg Jan 13 '13 at 20:06
  • Agree, but that's not my case. I have ~ 10MBps connection, and the WP servers are pretty fast as well. –  Jan 13 '13 at 20:09
  • did you check your error log to see if there are other errors? – keeg Jan 13 '13 at 20:11
  • [Sun Jan 13 21:07:49 2013] [error] [client ::1] File does not exist: E:/Local Server/htdocs/content, referer: http://localhost:8080/test%20wp/ –  Jan 13 '13 at 20:14
  • there are several logs like this one, after each of the upgrade attempts –  Jan 13 '13 at 20:15
  • 2
    i still say this is a server issue not a script issue – keeg Jan 13 '13 at 21:18
  • 2
    I agree with @keeg. It's probably not WP Core. WordPress takes awhile to update, period. Even on 100MB/s connections hosted in the cloud I've tested. Why don't you start by increasing/removing the limit on execution time and see how long it actually takes to finish ( if it finishes, which I think it will ). – Spencer Cameron-Morin Jan 18 '13 at 20:06
  • 2
    This is clearly a download time problem - ini_set solved this for me - thanks! – Q Studio Feb 11 '13 at 10:06
  • RESTART APACHE. You can say that again. – Afshin Ghazi Jul 09 '16 at 23:13
0

Seems like you cannot open connections from your server. If you have access to the shell, can you ping a site, for example:

 ping google.com

If the ping fails you are most probably behind a fierwall that won't let you out.

Dario
  • 81
  • 2
0

Open the php.ini file and replace

max_execution_time=valor

with

max_execution_time=0
tim
  • 1,999
  • 17
  • 32