Bug #13516: fpassthru uses too much memory
| From: | maardsma at arpinternational dot com | Date: | Tue, 02 Oct 2001 16:39:54 +0000 |
| Subject: | Bug #13516: fpassthru uses too much memory | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-67087@lists.php.net to get a copy of this message | ||
From: maardsma@arpinternational.com
Operating system: Irix
PHP version: 4.0.6
PHP Bug Type: Reproducible crash
Bug description: fpassthru uses too much memory
When using fpassthru to output the contents of a large >1MB file it uses a
lot of memory which causes my ISP's web server to terminate the httpd
thread because it used too much memory. As a result the download is cut
off.
If I use fread to read the file 1K at a time it works ok.
Shouldn't fpassthru read a 1 or 10K chunks to avoid excess memory use on
large files?
--
Edit bug report at: http://bugs.php.net/?id=13516&edit=1