RE: [PHP] How to detect a PHP script time-out?
| From: | Timothy Hitchens \(HiTCHO\) | Date: | Wed, 08 Jan 2003 03:36:52 +0000 |
| Subject: | RE: [PHP] How to detect a PHP script time-out? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-130689@lists.php.net to get a copy of this message | ||
This is a fairly simple one if both the server and browser obey the
specs:
Set up output buffering on your page then if the page times out the
buffer
should be sent to the browser and that is loaded with your message.
PSEUDO CODE:
start output buffering
put into buffer the required message
start building actual page in a string behind the scenes
fork--> page times out the buffer is sent out
--> page ends properly ... clear the buffer and output the
string you built
Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: tim@hitcho.com.au
> -----Original Message-----
> From: Jean-Christian Imbeault [mailto:jc@mega-bucks.co.jp]
> Sent: Wednesday, 8 January 2003 1:25 PM
> To: php-general@lists.php.net
> Subject: [PHP] How to detect a PHP script time-out?
>
>
> How can I detect if my PHP script is about to time-out?
>
> I would like to be able to detect a time-out and display a
> page with an
> appropriate error message "i.e. the server is busy now,
> please try again
> later".
>
> Jc
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>