Re: Emergency! Performance downloading big files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 1, 2009 at 3:21 PM, James McLean <james.mclean@xxxxxxxxx> wrote:

> 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 nginx:

header("X-Accel-Redirect: /uri/path/to/file")

in lighttpd (if I recall)

header("X-Sendfile: /full/path/to/file") or now header("X-Sendfile2:
/full/path/to/file byterange")

in apache there is a "mod_sendfile" module I think. never used it.

be sure to set appropriate other headers too. nginx will fill in the
content-length for you, but you need to fill in content-type i believe
still. things like that.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux