|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #37140 PHP / Apache can crash when accessing large files
Submitted: 2006-04-19 22:56 UTC Modified: 2009-05-08 17:41 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: david at acz dot org Assigned:
Status: Wont fix Package: Documentation problem
PHP Version: Irrelevant OS: SuSE Linux 9.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: david at acz dot org
New email:
PHP Version: OS:


 [2006-04-19 22:56 UTC] david at acz dot org
The manual mentions how to build PHP with large file support, but it should also warn that PHP / Apache can crash when accessing large files.

Reproduce code:
$fp = fopen("/tmp/large.dat", "w");
fseek($fp, 2147483646);
fwrite($fp, "xx");

Note that there is not actually a filesize rlimit set:

$x = posix_getrlimit();
echo $x["soft filesize"] . " " . $x["hard filesize"];

Returns: unlimited unlimited

Expected result:
PHP should write one byte to the file (the second byte puts it over 2GB).

Actual result:
[Wed Apr 19 17:44:13 2006] [notice] child pid 26994 exit signal File size limit exceeded (25)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-05-08 17:41 UTC]
This is an Apache memory limitation, not a crash caused by PHP.  As 
such, reference to the limitations (and potential workarounds) would be 
the scope of the Apache documentation, not the PHP manual.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Feb 25 09:01:26 2024 UTC