What you can do is to switch off output buffering. If it is a really large file you might want to generate the file offline and deliver it using the more conventional hyperlink.
all the best
Juan E Suris wrote:
Hi!
I have a problem with PHP and Apache, where Apache uses up a huge amount of memory. What happens is that I have a PHP script that creates a file on the fly and sends it directly to the broswer (as an attachment, so that the user can save it). The problem is that when the file is big and the client download speed is slow, the Apache process uses up as much memory as the file size. My guess here is that PHP keeps writing data as fast as it can, and Apache caches it in memory until the user can download it all.
Is there any way to avoid this?
My apologies if this is an obvious question.
Thanks,
Juan
--
Raditha Dissanayake.
-----------------------------------------------------------------------
http://www.radinks.net/ftp/applet/
An applet that breaks all the rules. Reads, Writes and deletes files on your hard disk. Uploads what's left to a third party server.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php