Please help: Prevent time-outs

This is a discussion on Please help: Prevent time-outs within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi All ! Could somebody help me out on this one: My script needs to execute a time consuming process which ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-06-2004
Jerry
 
Posts: n/a
Default Please help: Prevent time-outs

Hi All !

Could somebody help me out on this one:

My script needs to execute a time consuming process which might take
as long as an hour or so to finish. Usually, the time limit would
produce a time out after 30 seconds or so. Modifying the
set_time_limit() does not resolve the problem since the browser then
shows a could not display page error after 2 minutes or so.

Also, I do not need to wait for browser output after the process
finishes. Instead the server would send me an email.

In short words:
How can I get a script to work during an hours so without producing a
time-out and being able to close the browser upon starting the script.
Sort of "Fire and Forget".

Your help is greatly appreciated.
Jerry
Reply With Quote
  #2 (permalink)  
Old 06-06-2004
Garp
 
Posts: n/a
Default Re: Please help: Prevent time-outs


"Jerry" <submitstuff@lycos.com> wrote in message
news:j9m5c05quvpmv2llggvikl248qofav0ie8@4ax.com...
> Hi All !
>
> Could somebody help me out on this one:
>
> My script needs to execute a time consuming process which might take
> as long as an hour or so to finish. Usually, the time limit would
> produce a time out after 30 seconds or so. Modifying the
> set_time_limit() does not resolve the problem since the browser then
> shows a could not display page error after 2 minutes or so.
>
> Also, I do not need to wait for browser output after the process
> finishes. Instead the server would send me an email.
>
> In short words:
> How can I get a script to work during an hours so without producing a
> time-out and being able to close the browser upon starting the script.
> Sort of "Fire and Forget".
>
> Your help is greatly appreciated.
> Jerry


Does running the script from the command line (php -f script.php) not suit
your purposes?

Garp


Reply With Quote
  #3 (permalink)  
Old 06-06-2004
Chung Leong
 
Posts: n/a
Default Re: Please help: Prevent time-outs

"Jerry" <submitstuff@lycos.com> wrote in message
news:j9m5c05quvpmv2llggvikl248qofav0ie8@4ax.com...
> Hi All !
>
> Could somebody help me out on this one:
>
> My script needs to execute a time consuming process which might take
> as long as an hour or so to finish. Usually, the time limit would
> produce a time out after 30 seconds or so. Modifying the
> set_time_limit() does not resolve the problem since the browser then
> shows a could not display page error after 2 minutes or so.
>
> Also, I do not need to wait for browser output after the process
> finishes. Instead the server would send me an email.
>
> In short words:
> How can I get a script to work during an hours so without producing a
> time-out and being able to close the browser upon starting the script.
> Sort of "Fire and Forget".


To prevent browser time out you need to send something--a HTML comment
perhaps--to it every now and then. Not a good solution though for a script
that runs for an hour, since a lot of data could be transferred in that time
and the browser could crash from the massive DOM tree.

register_shutdown_function() might be what you're looking for.


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:18 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0