> Hi Larry, > > > 4) So given #2 and #3, the "readfile() will kill your memory, don't use it" > > line is a persistent urban legend that belongs on Snopes as debunked. > > Looping on fread() for performance is a red herring. > > I implemented this earlier this very year to avoid memory issues (a > quick look at project history shows me working on it in January). The > difference between using readfile, and some convoluted method from the > documentation comments was clear and immediate: corrupted download > with out of memory error in the logs, to things working just fine. > > Let me re-create with a simple test script and share my server details > before we call snopes :)
Are you sure that you are *not* using ob_start()/ob_flush()/... (output buffering)? If this is the case, readfile writes to the output, but buffers everything in memory, as the PHP output buffering is active? Uwe -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php