php.net |  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
Votes:2
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
Have you experienced this issue?
Rate the importance of this bug to you:

 [2006-04-19 22:56 UTC] david at acz dot org
Description:
------------
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)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-05-08 17:41 UTC] danbrown@php.net
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-2019 The PHP Group
All rights reserved.
Last updated: Mon Aug 19 16:01:27 2019 UTC