|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #24262 memory_limit poorly documented --> webserver hangs
Submitted: 2003-06-19 16:39 UTC Modified: 2003-09-10 21:13 UTC
Avg. Score:4.5 ± 0.5
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: kop at meme dot com Assigned:
Status: Wont fix Package: Documentation problem
PHP Version: 4.3.1 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2003-06-19 16:39 UTC] kop at meme dot com
The memory_limit configuration parameter is poorly documented.  There's no information on just what uses memory.

In particular, earlier versions of php read the entireity of uploaded files into memory.  (See bug 17606.)  If you do a bug search on "memory_limit" you will find quite a number of people have reported problems trying to upload large files and very often it seems likely that the problem was their memory_limit was set too low.  This is a big problem as there are a likely a large number of people out there useing versions of php where memory_limit limits file upload size.

Minimally, the documentation on memory_limit should mention it's relationship to file upload size _and_ the documentation on upload_max_size should refer you to the memory_limit documentation.  (Or maybe the reverse as it's increasing the upload size that causes memory problems.)  

Really, there should be an explaination of what uses memory in what versions of PHP so people can correctly configure their machines.

post_max_size does mention memory_limit.

Finally, it's worth noteing somewhere that when php runs out of memory the webserver hangs and must be stopped and restarted.  (
Linux <snip> 2.4.20-18.7 #1 Thu May 29 06:51:53 EDT 2003 i686 unknown
Red Hat Linux release 7.3 (Valhalla)
(As you may have guessed, it was quite a hassle tracking down the cause of the every-other-month webserver hang.)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-09-10 21:13 UTC]
if someone is really still running a version that old
that file uploads are memory bound he/she has 
more serious (security related) problems to deal
with than memory_limit and should at least 
disable file uploads completly

-> backdocumenting this is not worth the effort

... and that your server hangs when it runs out of memory
(no matter what comsumed that memory in the first place)
should be obvious enough (or at least not be considered
as especially PHP related)
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Feb 23 05:01:27 2024 UTC