Doc #65389 [NEW]: Correlation between memory_limit and post_max_size

From: Date: Mon, 05 Aug 2013 09:21:24 +0000
Subject: Doc #65389 [NEW]: Correlation between memory_limit and post_max_size
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-10137@lists.php.net to get a copy of this message
From: marc at ermshaus dot org Operating system: PHP version: Irrelevant Package: Documentation problem Bug Type: Documentation Problem Bug description:Correlation between memory_limit and post_max_size 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 bug report at https://bugs.php.net/bug.php?id=65389&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65389&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=65389&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65389&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=65389&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=65389&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=65389&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=65389&r=needscript Try newer version: https://bugs.php.net/fix.php?id=65389&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=65389&r=support Expected behavior: https://bugs.php.net/fix.php?id=65389&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=65389&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=65389&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=65389&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65389&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=65389&r=dst IIS Stability: https://bugs.php.net/fix.php?id=65389&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=65389&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=65389&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=65389&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=65389&r=mysqlcfg

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