Doc #52229 [Com]: memory_limit vs post_max_size: misleading or incomplete documentation
Edit report at http://bugs.php.net/bug.php?id=52229&edit=1
ID: 52229
Comment by: mycroes at gmail dot com
Reported by: gustavo at angulosolido dot pt
Summary: memory_limit vs post_max_size: misleading or
incomplete documentation
Status: Open
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
Block user comment: N
New Comment:
It is correct that uploading larger files is possible, however not in
all ways.
When using Apache with mod-php it's not possible to upload a file using
stdin
that's larger than the memory limit, probably because the script will
get invoked
only as soon as all the post data is available. Thus when using client
side
methods like plupload, it's impossible to upload files larger than
memory_limit,
which is quite annoying.
Previous Comments:
------------------------------------------------------------------------
[2010-07-01 23:43:33] gustavo at angulosolido dot pt
Description:
------------
It is stated here:
http://www.php.net/manual/en/ini.core.php#ini.post-max-size
the memory_limit variable must be greater then post_max_size. This is
repeated all over the Internet as can be seen by googling it.
However empirical evidence has shown otherwise. It is possible to upload
files which are, say, 3 times larger than the memory_limit.
Similar reports also question that statement:
http://zendframework.com/issues/browse/ZF-5703
http://www.php.net/manual/en/features.file-upload.php#78017
Another issue is that the relation between the allocation limit
(memory_limit) and the actual size of the php-cgi process (when PHP is
used with mod_fcdid or similar...) is not explained. It can be seen that
a php-cgi process seems to start with a fixed memory size independent
from memory_limit.
It would be very helpful if this could be clarified here:
http://www.php.net/manual/en/ini.core.php#ini.memory-limit
http://www.php.net/manual/en/ini.core.php#ini.post-max-size
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52229&edit=1
Thread (4 messages)