Re: readfile() memory usage
| From: | Simon Schick | Date: | Fri, 11 May 2012 07:15:10 +0000 |
| Subject: | Re: readfile() memory usage | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-60530@lists.php.net to get a copy of this message | ||
Hi, Everyone
FYI: If you just want to check something before serving a file to the
client, you can also use something called xsendfile.
Apache: https://tn123.org/mod_xsendfile/
lighttpd: It's build in :)
nginx: http://wiki.nginx.org/XSendfile
Idea:
Do what you're doing in your php-script and add the header
"X-Sendfile: $yourFile" (nginx is using another header).
This header will trigger the plugin and the webserver will serve the
file instead of your php-process.
I personally use it on my webserver and it works quite fine. Debian
has a compiled package called libapache2-mod-xsendfile in version 0.9
Bye
Simon
On Fri, May 4, 2012 at 2:33 PM, Paul Reinheimer <preinheimer@gmail.com> wrote:
>
> Hi Everyone
>
> >> So, I think we're back to "urban legend" territory.
>
> I've updated the documentation for readfile() to help send more people
> down the path of checking for output buffering, and disabling that
> rather than contriving loops with fread().
>
> http://docs.php.net/readfile
>
>
>
> paul
>
>
> --
> Paul Reinheimer
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>