Forum Moderators: coopster

Message Too Old, No Replies

Maximum execution time of 30 seconds exceeded...

How do I adjust the max execution time for a page?

         

s1dev

9:38 pm on Jan 10, 2005 (gmt 0)

10+ Year Member



The title says it all. I have a page that is execeeding the maximum execution time - (alot of data processed). I couldn't find a function/command in the PHP manual, but am looking for a way to increase the time (programatically when the page is run if possible).

Basically I want the page to tell the server - 'I'm gonna take a long time, don't cut me off'

Thanks in advance for any comments/answers

orion_rus

9:41 pm on Jan 10, 2005 (gmt 0)

10+ Year Member



hmm, why don't u simple grab a time before each data execution on this page. and if starttime+30 seconds exceeded u push this text

s1dev

9:48 pm on Jan 10, 2005 (gmt 0)

10+ Year Member



Sounds simple. The loop is using echo (its basically a data dump), are you saying I need to flush what I've echo-ed every so often? What is the function to do that?

orion_rus

10:26 pm on Jan 10, 2005 (gmt 0)

10+ Year Member



I can advice you the following. U can make it fully with javascript. In client side u start timer. And load content to a hidden frame. in onload action of this frame u copy its content to a visible container in ur side and stops timer. If timer is up and 30 seconds already done u can show button which copy all content from a hidden frame and stops it's loading) That's all)

s1dev

10:28 pm on Jan 10, 2005 (gmt 0)

10+ Year Member



Unfortunately this is a process dumping data to a file. I don't have the luxury of doing it chunks and passing it between frames. Thanks for your suggestion though.

bcolflesh

10:30 pm on Jan 10, 2005 (gmt 0)

s1dev

10:47 pm on Jan 10, 2005 (gmt 0)

10+ Year Member



SOLVED:

[us2.php.net...]

The set_time_limit function allows you to set the number of seconds before the script will timeout. The 'timer' gets reset to zero everytime the function is executed, thus buying even more time for execution.

s1dev

10:48 pm on Jan 10, 2005 (gmt 0)

10+ Year Member



Thanks bcolflesh