Re: large files and readfile
| From: | Richard Davey | Date: | Mon, 06 Feb 2006 19:33:12 +0000 |
| Subject: | Re: large files and readfile | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-229993@lists.php.net to get a copy of this message | ||
On 6 Feb 2006, at 17:21, Daniel Bondurant wrote:
I am using php and readfile() to control the download of largefpassthru does not load the file fully into memory first. How are you benchmarking the memory load (and determining its specific cause) ? What other systems might be at work here causing this? What else does your script do? Cheers, Rich -- http://www.corephp.co.uk Zend Certified Engineer PHP Development Servicesfiles; These files can be up to 1GB. There is nothing really exciting or special about the script itself.The problem I am running into is php is loading the entire file into apache's memory as the file is being read - this seems quite unnecessary. I tired it with fpassthru() as well, with the same result. Why is php loading the entire file into memory? Is there another/better way to download the files (other that resorting to mod_rewrite) that won't use up necessary memory?