Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60397 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91708 invoked from network); 1 May 2012 16:40:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 May 2012 16:40:56 -0000 Authentication-Results: pb1.pair.com header.from=larry@garfieldtech.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=larry@garfieldtech.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain garfieldtech.com from 66.111.4.28 cause and error) X-PHP-List-Original-Sender: larry@garfieldtech.com X-Host-Fingerprint: 66.111.4.28 out4-smtp.messagingengine.com Received: from [66.111.4.28] ([66.111.4.28:33212] helo=out4-smtp.messagingengine.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FC/48-38165-71210AF4 for ; Tue, 01 May 2012 12:40:55 -0400 Received: from compute2.internal (compute2.nyi.mail.srv.osa [10.202.2.42]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 19CEE20949 for ; Tue, 1 May 2012 12:40:53 -0400 (EDT) Received: from frontend1.nyi.mail.srv.osa ([10.202.2.160]) by compute2.internal (MEProxy); Tue, 01 May 2012 12:40:53 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=yCEa1BhhukVHercLTY4GeO dvmAY=; b=CkM3fRH4YH3Cgk7/d73lVA69rT+vz0nI8mNwBZ9yccb5+cY/liFbnD wlh+YcuYegaBoF6GDmG9iGHFSGPCQJqqJ9Ixdknftu9aAeulygp3XlmP3vmzvr/k eWFJNzI3ipjS+hfQ3Vw/tUDj1LupFWFO6jgRn1C0DzqzAx+BDw8i0= X-Sasl-enc: XHCz10Tob6+d0cmdw0iFi5y0ZJApuKEjc57Fan5tG9jV 1335890452 Received: from garfield.local (unknown [209.41.114.202]) by mail.messagingengine.com (Postfix) with ESMTPSA id C4F438E008A for ; Tue, 1 May 2012 12:40:52 -0400 (EDT) Message-ID: <4FA01214.5030606@garfieldtech.com> Date: Tue, 01 May 2012 11:40:52 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: internals@lists.php.net References: <4F9E2173.50005@garfieldtech.com> <000e01cd269a$06f15230$14d3f690$@php.net> <002701cd26b5$1cd0bb70$56723250$@thetaphi.de> <4F9EC8B4.3040600@garfieldtech.com> <4F9F4208.7020106@garfieldtech.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] readfile() memory usage From: larry@garfieldtech.com (Larry Garfield) On 5/1/12 10:01 AM, Paul Reinheimer wrote: > Hi All, > >> Unfortunately, you've ignored Uwe's e-mail... The problem is not the PHP >> version; the problem is that you're buffering unlimited amounts of data. >> Check your configuration and make sure ob_get_level() returns 0. > > My apologies in the delay, ob_get_level() returns 1, good catch. > phpinfo() reports output_buffering as 4096 > > > Does this push what I'm getting into expected behaviour? > > > paul It sounds like it. In that case the memory spike is happening in the output buffer, where the file is streamed into by readfile() in 8K chunks until the output buffer explodes. :-) So, I think we're back to "urban legend" territory. --Larry Garfield