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

From: Date: Wed, 05 Aug 2015 14:49:08 +0000
Subject: Doc #65389 [Ana]: Correlation between memory_limit and post_max_size
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-12580@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: cmb@php.net Reported by: marc at ermshaus dot org Summary: Correlation between memory_limit and post_max_size Status: Analyzed Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: > This report is valid, since newer handler does not consume > memory. The "newer handler" basically seems to be in place since 2001[1] (i.e. long before PHP 5.0.0), so the documentation doesn't have to mention it in the changelog. [1] <https://github.com/php/php-src/commit/44b68122c2ba0cf07cd837af160b3bd01527d081> Previous Comments: ------------------------------------------------------------------------ [2013-08-18 07:27:51] yohgaki@php.net This report is valid, since newer handler does not consume memory. Current documentation is valid for old PHPs which are no longer supported. ------------------------------------------------------------------------ [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

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