Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60530 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57467 invoked from network); 11 May 2012 07:15:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 May 2012 07:15:16 -0000 Authentication-Results: pb1.pair.com smtp.mail=simonsimcity@googlemail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=simonsimcity@googlemail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 209.85.214.170 as permitted sender) X-PHP-List-Original-Sender: simonsimcity@googlemail.com X-Host-Fingerprint: 209.85.214.170 mail-ob0-f170.google.com Received: from [209.85.214.170] ([209.85.214.170:49387] helo=mail-ob0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 00/02-45982-08CBCAF4 for ; Fri, 11 May 2012 03:15:13 -0400 Received: by obbuo13 with SMTP id uo13so3208803obb.29 for ; Fri, 11 May 2012 00:15:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=B/Jitk2TLRttWTb+SRtJOPwKwlI20PQ9ewdagwgFC14=; b=a3J0tYZxl4ScP+3Llp7/5EJ/mX8OugkBS4O0Yt+qCMCiaSl59hN72N7Vk7IRjBYXWn xHeFJPvip34oaGG7iA8S76QrTj0DufJOGZ33nVkW9AXEw72hU77RIPfnDSHmgDk5gYQq WhzHeihAIpz1GjYUbjcedIMidsBOdT7u7i8673+mjVQ0o4GUqZy9hNasnJxKEEZ73Mex C/Waj4NwgvCdSg5vuMt/f3yxNj0tpFMxis0R666H6mVOu/EvI8MOYdWQEaBvu4DnnBxw DrhewD/H0zDIVwA+6s4N7Ep7cDomr+4aJs5hYSyFZwaIG6O06DbSkAEuo2Vp73HotZCj vz3A== MIME-Version: 1.0 Received: by 10.182.154.73 with SMTP id vm9mr5587453obb.72.1336720510103; Fri, 11 May 2012 00:15:10 -0700 (PDT) Received: by 10.60.58.169 with HTTP; Fri, 11 May 2012 00:15:10 -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 09:15:10 +0200 Message-ID: To: Paul Reinheimer Cc: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] readfile() memory usage From: simonsimcity@googlemail.com (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 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 >