I\'m having the following problem with my VPS server.
I have a long-running PHP script that sends big files to the browser. It does something like this:
I have tried different approaches (reading and sending the files in small chunks [see comments on readfile
in PHP doc], using PEARs HTTP_Download) but I always ran into performance problems when the files are getting big.
There is an Apache mod X-Sendfile
where you can do your business logic and then delegate the download to Apache. The download will not be publicly available. I think, this is the most elegant solution for the problem.
More Info: