Doc #52229 [Opn->Bgs]: memory_limit vs post_max_size: misleading or incomplete documentation

From: Date: Mon, 25 Oct 2010 19:12:21 +0000
Subject: Doc #52229 [Opn->Bgs]: memory_limit vs post_max_size: misleading or incomplete documentation
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-5410@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=52229&edit=1 ID: 52229 Updated by: kalle@php.net Reported by: gustavo at angulosolido dot pt Summary: memory_limit vs post_max_size: misleading or incomplete documentation -Status: Open +Status: Bogus Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant Block user comment: N New Comment: As said by Ilia: We no longer load the uploaded file entirely into memory. So I think it should be possible to upload a file that is > than the memory limit Previous Comments: ------------------------------------------------------------------------ [2010-08-27 12:40:09] mycroes at gmail dot com 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. ------------------------------------------------------------------------ [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

« previous php.doc.bugs (#5410) next »