> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 15, 2002 12:23 PM
> To: 'Octavian Rasnita'; [EMAIL PROTECTED]
> Subject: Re: Why "Premature end of script headers"?
> 
> 
> > Probably your web server is timing out the request and killing your
> > script. Web servers don't like to run long-running processes like
> > this. Perhaps you can fork off a child and have the child take care
> > of it.
> 
> Another solution is to have something like the following in your loop:
> --------------------------------------------------
> local $|=1; # print things right away (no buffering)
> # $ltime and $ctime should be defined before the loop
> $ctime = time();
> if ($ltime ne $ctime){
>     print " . ";
>     $ltime = $ctime;
> }
> --------------------------------------------------
> Then the browser does not time out because it continually 
> gets information, so it simply prints
> another period to the browser every one second that it is 
> working.  This can help you know its still
> working.

True. But there are two possible downsides to consider:

1. It ties up a server process for an extended period.
2. The server will kill the CGI script if the client goes away
or the connection is lost.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to