Doc #65389 [Opn->Ana]: Correlation between memory_limit and post_max_size
| From: | yohgaki@php.net | Date: | Sun, 18 Aug 2013 07:27:51 +0000 |
| Subject: | Doc #65389 [Opn->Ana]: Correlation between memory_limit and post_max_size | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-10173@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65389&edit=1
ID: 65389
Updated by: yohgaki@php.net
Reported by: marc at ermshaus dot org
Summary: Correlation between memory_limit and post_max_size
-Status: Open
+Status: Analyzed
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
This report is valid, since newer handler does not consume memory. Current
documentation is valid for old PHPs which are no longer supported.
Previous Comments:
------------------------------------------------------------------------
[2013-08-05 09:21:24] marc at ermshaus dot org
Description:
------------
This is more or less a duplicate of this bug report:
- https://bugs.php.net/bug.php?id=52229
I am opening a new one because I think my comment there went by unnoticed.
http://www.php.net/manual/en/ini.core.php#ini.post-max-size
states:
âIf memory limit is enabled by your configure script, memory_limit also affects
file uploading. Generally speaking, memory_limit should be larger than
post_max_size.â
To me, the phrasing is misleading as it implies that file uploads (<input
type="file">, multipart/form-data, $_FILES array) have to fit into
memory_limit. That is probably not the case. It is my understanding that the
second sentence from the quote only holds true for large
application/x-www-form-urlencoded POST requests (without file uploads) while
the first sentence is more or less incorrect/superfluous.
For example, uploading two 4M files with settings memory_limit 2M,
post_max_size 10M, upload_max_filesize 5M should work. 4M < upload_max_filesize
and 4M+4M < post_max_size. memory_limit should not affect this at all.
Other mentions and discussion of this issue:
- http://stackoverflow.com/questions/3651141/in-php-settings-should-memory-limit-upload-max-filesize
- http://stackoverflow.com/questions/5106871/relationship-between-phps-memory-limit-upload-max-filesize-and-post-max-filesi
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65389&edit=1