Bug #62921 [NEW]: max_input_vars crops total amount of variables, not per nesting level
| From: | andysh at ukr dot net | Date: | Fri, 24 Aug 2012 10:06:26 +0000 |
| Subject: | Bug #62921 [NEW]: max_input_vars crops total amount of variables, not per nesting level | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-172871@lists.php.net to get a copy of this message | ||
From: andysh at ukr dot net
Operating system: FreeBSD 9.0-RELEASE
PHP version: 5.4.6
Package: PHP options/info functions
Bug Type: Bug
Bug description:max_input_vars crops total amount of variables, not per nesting level
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 bug report at https://bugs.php.net/bug.php?id=62921&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62921&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62921&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62921&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=62921&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62921&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=62921&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=62921&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=62921&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=62921&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=62921&r=support
Expected behavior: https://bugs.php.net/fix.php?id=62921&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=62921&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=62921&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=62921&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62921&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=62921&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=62921&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=62921&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=62921&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=62921&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=62921&r=mysqlcfg