php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30520 readfile needs too much memory
Submitted: 2004-10-21 21:43 UTC Modified: 2004-10-27 18:55 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: spacefreak at rheintalchat dot ch Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 4.3.9 OS: Gentoo Linux (Kernel 2.6.8.1)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: spacefreak at rheintalchat dot ch
New email:
PHP Version: OS:

 

 [2004-10-21 21:43 UTC] spacefreak at rheintalchat dot ch
Description:
------------
I've got a big problem. I use the readfile function for share any files over the webserver. I use it, because I need user authentication.
It works nice with small files.

Actual result:
--------------
The problem is that. PHP will load the hole file from the harddisc into the memory. If I use the fpassthru function, the memory will be freed, but PHP use the hole memory for buffering.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-27 18:55 UTC] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

no surprises here, the function uses mmap.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 21 02:00:03 2025 UTC