Re: Emergency! Performance downloading big files
| From: | Colin Guthrie | Date: | Wed, 02 Dec 2009 09:42:04 +0000 |
| Subject: | Re: Emergency! Performance downloading big files | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-300201@lists.php.net to get a copy of this message | ||
'Twas brillig, and Michael Shadle at 01/12/09 23:51 did gyre and gimble:
On Tue, Dec 1, 2009 at 3:21 PM, James McLean <james.mclean@gmail.com> wrote:I think there has been some confusion.... The OP wanted a way to *download* the files *from* somewhere, not dish them up to his clients. I think some or the replies were assuming he wanted to have a PHP script as a guardian to protect content from unauthorised users but that is not what he actually said!The suggestion from other users of off-loading the PDF downloading to Apache (or another webserver) is a good idea also.^ I never allow PHP to be [ab]used and kept open to spoonfeed clients with fopen/readfile/etc.
in apache there is a "mod_sendfile" module I think. never used it.The above said, I didn't know about this module and it looks rather useful, so thanks for pointing it out :D Here is the first Google result I found on this issue which explains it a bit. http://codeutopia.net/blog/2009/03/06/sending-files-better-apache-mod_xsendfile-and-php/ Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/]