Bug #62921 [Opn->Csd]: max_input_vars crops total amount of variables, not per nesting level
| From: | daverandom@php.net | Date: | Thu, 12 Sep 2013 14:37:21 +0000 |
| Subject: | Bug #62921 [Opn->Csd]: 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-10259@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: daverandom@php.net
Reported by: andysh at ukr dot net
Summary: max_input_vars crops total amount of variables, not
per nesting level
-Status: Open
+Status: Closed
Type: Bug
Package: Documentation problem
Operating System: FreeBSD 9.0-RELEASE
PHP Version: 5.4.6
-Assigned To:
+Assigned To: daverandom
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.
Previous Comments:
------------------------------------------------------------------------
[2013-09-09 14:34:57] daverandom@php.net
Automatic comment from SVN on behalf of daverandom
Revision: http://svn.php.net/viewvc/?view=revision&revision=331320
Log: Per Bug #62921, max_input_vars is not per nesting level.
--
Provided by anonymous #33344 (keithm@aoeex.com)
------------------------------------------------------------------------
[2012-08-24 14:03:53] rasmus@php.net
This is a documentation bug. The limit is across all nesting levels.
------------------------------------------------------------------------
[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