Posted by Toby A Inkster on 05/10/07 19:46
Gilles Ganault wrote:
> Is there a way to send empty, fake data to keep the browser happy
> while the code is running on the server?
Schraalhans Keukenmeester's point is an important one: the browser is not
the only thing with a timeout -- mod_php has its own timeout too.
Increase the max execution time as he said. To solve browser timeout
issues, slowly feed it some dummy data. Assuming that your script is
outputting HTML or XML, you could include something like this inside one
of your loops:
echo "<!-- x -->\n";
This assumes of course that you don't need to output any HTTP headers as
part of this long-running code, as body output obviously prevents the
header() function from working.
--
Toby A Inkster BSc (Hons) ARCS
http://tobyinkster.co.uk/
Geek of ~ HTML/SQL/Perl/PHP/Python/Apache/Linux
[Back to original message]
|