I know it doesn't really fit this problem in general, but I figured I would point it out. Lighttpd introduced a brilliant concept by letting the server serve that file directly. Basically, instead of using readfile, you would just send a header: X-SendFile: $filename... It's available for Apache (as a module: http://www.jasny.net/articles/how-i-php-x-sendfile/) and NginX as well.
The benefit is that the file never needs to be moved around in memory, it can be directly mapped to the network card by the OS. Just pointing it out (although it doesn't directly apply to the memory usage, it solves the problem differently, and better)... Anthony On Tue, May 1, 2012 at 9:55 AM, Gustavo Lopes <glo...@nebm.ist.utl.pt> wrote: > On Tue, 01 May 2012 15:39:56 +0200, Paul Reinheimer <preinhei...@gmail.com> > wrote: > >>> Fascinating. I even verified the md5sum of the file I got on the other >>> end just to be sure. I'll hold off on the blog post then. :-) I look >>> forward to your test setup. >> >> >> The server in question is still on PHP 5.2.13 >> >> [...] >> >> >> I'll try something newer, but I wanted to prove myself not crazy and >> do it on the server in question first. >> > > 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. > > -- > Gustavo Lopes > > > -- > 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