Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60531 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76174 invoked from network); 11 May 2012 10:02:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 May 2012 10:02:18 -0000 Authentication-Results: pb1.pair.com header.from=sebastian.krebs.berlin@googlemail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=krebs.seb@googlemail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 74.125.83.42 as permitted sender) X-PHP-List-Original-Sender: krebs.seb@googlemail.com X-Host-Fingerprint: 74.125.83.42 mail-ee0-f42.google.com Received: from [74.125.83.42] ([74.125.83.42:37117] helo=mail-ee0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 92/F4-45982-9A3ECAF4 for ; Fri, 11 May 2012 06:02:17 -0400 Received: by eekb57 with SMTP id b57so857287eek.29 for ; Fri, 11 May 2012 03:02:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:sender:x-google-sender-delegation:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type; bh=aiyDQzs11zy8RW+f24wNr4rJjmpzBkgIPAyy8krFcGU=; b=1I+lFh6r7Dm1OyXDKNWVo0a5YgBn23chUStK/i8JxNpAHLh1Xt9tBs4PiBBLfMo58t /CwxW3rGxLdl2QKTYgh8v3pAkD0+U+IS+8UYQKVUpte+v4uPhVMo7VjGVaGl0z9WQxa+ CkTu9TnvOVB+nfP6ZSISKOm/8rMRC8EBtRcNjRpBbB/ED7coolQvxiV2UoO/PGgrLH0d /6OtiK4l6ZJljTPjVtEUPcc75PiOi27jIXQnq9sydvw8WFQIshxpdfdzBoR3V6uwoppP zpQ3XOdYclwRlCKqKrdG1yJ5IUhgtpy/BqI8ojcOB7D/dRWQnZ+olDCEuCor++O9SA8S ryIA== MIME-Version: 1.0 Received: by 10.213.27.206 with SMTP id j14mr2246967ebc.131.1336730534412; Fri, 11 May 2012 03:02:14 -0700 (PDT) Sender: sebastian.krebs.berlin@googlemail.com X-Google-Sender-Delegation: sebastian.krebs.berlin@googlemail.com Received: by 10.14.176.3 with HTTP; Fri, 11 May 2012 03:02:14 -0700 (PDT) In-Reply-To: References: <4F9E2173.50005@garfieldtech.com> <000e01cd269a$06f15230$14d3f690$@php.net> <002701cd26b5$1cd0bb70$56723250$@thetaphi.de> <4F9EC8B4.3040600@garfieldtech.com> <4F9F4208.7020106@garfieldtech.com> <4FA01214.5030606@garfieldtech.com> <4FA1F7CE.1090409@garfieldtech.com> Date: Fri, 11 May 2012 12:02:14 +0200 X-Google-Sender-Auth: AlN6Cg60P0zCH50lv1RYqbJxKGI Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary=0015174c125aaa02cb04bfbfd4d1 Subject: Re: [PHP-DEV] readfile() memory usage From: krebs.seb@googlemail.com (Sebastian Krebs) --0015174c125aaa02cb04bfbfd4d1 Content-Type: text/plain; charset=ISO-8859-1 Hi, 2012/5/11 Simon Schick > 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 It's named "X-Accel" and build in too (as long as it's not explicitly disabled) http://wiki.nginx.org/Modules http://wiki.nginx.org/X-accel > > > 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 > 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 > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --0015174c125aaa02cb04bfbfd4d1--