> I was wondering what happens if you call the readfile function to output a
> large binary file to a client with a slow connection.
> Does the script run until the whole file is sent to the client (leading to
> timeout errors on servers with a low max execution time) or does it fill
> some sort of buffer on the web server which then takes over and sends the
> file to the client?

Yes. :-)

Odds are pretty good that you can count on network activity to screw this up
sooner or later, no matter how big that buffer might be.

Add some code to guesstimate how long it ought to take, double it and add 30
(metric time)* and use the time_limit function.  Or use 0 time limit, and
pray you never mess up the code that spews all that to the browser.

In any situation like this, the time to add a little code to anticipate a
problem is almost always a "win".

* If you don't understand why double it and add 30 is metric time, you need
to buy Bob&Doug's _Great_White_North album.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to