On 05/01/2012 06:39 AM, Paul Reinheimer wrote: > Hi Larry, > >> 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 > > Script: > <?php > ini_set('memory_limit', '8M'); > $name = uniqid() . ".zip"; > header('Content-type: application/zip'); > header("Content-Disposition: attachment; filename=\"$name\""); > readfile('../../filestorage/4f9e9e3b9bcff.zip'); > > File Information: > [user@host public]$ ls -alh ../../filestorage/4f9e9e3b9bcff.zip > -rw-r--r-- 1 apache apache 27M Apr 30 10:14 > ../../filestorage/4f9e9e3b9bcff.zip > > Error: > [Tue May 01 09:30:48 2012] [error] [client 198.136.162.2] PHP Fatal > error: Allowed memory size of 8388608 bytes exhausted (tried to > allocate 27617281 bytes) in > /home/lots/of/path.org/stuff/public/rf822.php on line 6 > > > I'll try something newer, but I wanted to prove myself not crazy and > do it on the server in question first.
That's odd, because PHP 5.2 has identical code in this respect. Wez committed these changes in 2002: https://github.com/php/php-src/commit/a662f012bba5a6fdc50533673f3fff47bf9af219#diff-5 So it has been like this for quite a while. Does that server have implicit unlimited output buffering turned on in your ini file? -Rasmus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php