You are here: Re: How to handle lengthy operations? « PHP Programming Language « IT news, forums, messages
Re: How to handle lengthy operations?

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация