Jump to content

ini_set('max_execution_time', $whatIsTheLimit);


johnsmith153

Recommended Posts

max_execution_time is an integer, so the maximum value that you can set is 2147483647 seconds (over 68 years) on a 32-bit system (i.e 2^31, with the msb reserved for the sign). The alternative is to set the value to 0, which means that the script will never time out.

Of course, if you're running you script through the web server, as a CGI script, then the web server is also likely to have its own timeout.

 

The set_time_limit function allows you to override this value, and dynamically extend the time-out period one or more times during script execution; though it's still constrained by the web server timeout.

Link to comment
Share on other sites

so can the web server overide this new set time out in the script?

The web server does override the PHP limit. The web server will send an appropriate response to the client browser when it times out, if PHP has not finished executing.

 

I can't recall what the Apache config parameter is off the top of my head, but it's likely to be in the httpd.conf file.

 

However, Apache default is something like 300 seconds (5 minutes). Most people would abort a page if they hadn't had a response in this time. So you also need to determine what should happen if the user aborts their transaction, or closes their browser window because they're fed up waiting to see a response.

 

Link to comment
Share on other sites

  • 1 year later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.