Bug #62921 [Opn]: max_input_vars crops total amount of variables, not per nesting level

From: Date: Fri, 24 Aug 2012 14:03:53 +0000
Subject: Bug #62921 [Opn]: max_input_vars crops total amount of variables, not per nesting level
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-8762@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=62921&edit=1 ID: 62921 Updated by: rasmus@php.net Reported by: andysh at ukr dot net Summary: max_input_vars crops total amount of variables, not per nesting level Status: Open Type: Bug -Package: PHP options/info functions +Package: Documentation problem Operating System: FreeBSD 9.0-RELEASE PHP Version: 5.4.6 Block user comment: N Private report: N New Comment: This is a documentation bug. The limit is across all nesting levels. Previous Comments: ------------------------------------------------------------------------ [2012-08-24 10:06:25] andysh at ukr dot net Description: ------------ I set in php.ini max_input_vars = 10000 Than I post array which has 100 elements on first level and 105 elements on second level for every first-level element. I expected to receive full array, but it was cropped to 10000 elements. Documentation says: "This limit applies only to each nesting level of a multi-dimensional input array." (http://www.php.net/manual/en/info.configuration.php#ini.max-input-vars). Test script: --------------- <? if (!empty($_POST)) { echo '<pre>'; var_dump($_POST); die; } ?> <form action='' method='POST'> <? for ($i = 0; $i < 100; $i++): ?> <? for ($j = 0; $j < 105; $j++): ?> <input type='text' name='ch[<?= $i ?>][]' value='<?= $j ?>' /> <? endfor; ?> <? endfor; ?> <input type='submit' /> </form> Expected result: ---------------- Array which has: - 1 element on zero level - 100 elements on first level - 105 elements on second level for every first-level element Actual result: -------------- Array has: - 1 element on zero level - 96 elements on first level - 105 elements on second level for first 95 first-level elements - 25 elements on second level for last first-level element Total amount of elements in array is 10000 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=62921&edit=1

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