Re: readfile() memory usage

From: Date: Tue, 01 May 2012 16:40:52 +0000
Subject: Re: readfile() memory usage
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.internals 
Request: Send a blank email to internals+get-60397@lists.php.net to get a copy of this message
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

« previous php.internals (#60397) next »