From: Operating system: Linux PHP version: 5.3.8 Package: Scripting Engine problem Bug Type: Bug Bug description:cannot have more than 1000 entries in the _POST array
Description: ------------ System is PHP 5.3.8 on Apache 2.2.x on various systems. Debian packages and self compiled packages. Problem: If a script sends more than 1000 _POST entries everything above 1000 is ignore. This bug does not exist in 5.3.5, but also appears in 5.3.6 The Post MAX size is on all systems at least 20MB or more, but the size does not matter it is the element count in _POST that triggers the error Test script: --------------- <? // possible bug in php 5.3.6-13 of debian/testing // too large post data gets truncated // write POST log $fp = fopen(getcwd().'/DEBUG.LOG', 'a'); fwrite($fp, '['.date('Y-m-d H:i:s').'] ====>'."\n"); fwrite($fp, var_export($_POST, true)."\n"); fwrite($fp, '['.date('Y-m-d H:i:s').'] ====>'."\n"); fclose($fp); // test if limit is really 1000 for ($i = 1; $i <= 1010; $i ++) { $data['pos_'.$i] = 'DATA: '.$i; } ?> <html> <head> <title>POST debug test</title> </head> <body> PHP VERSION: <?=PHP_VERSION_ID;?><br> <div style="color: red;"> <? if (is_array($_POST)) { print "Original data: ".count($data)."<br>"; print "POST DATA: ".count($_POST)."<br>"; if (count($_POST) < count($data)) print "ERROR: POST count is smaller than original data count<br>"; } ?> </div> <form method="post"> <? foreach ($data as $key => $value) { ?> <input type="hidden" name="<?=$key;?>" value="<?=urldecode($value);?>"> <? } ?> <input type="submit" name="send_post" value="Send POST"> </form> </body> </html> Expected result: ---------------- _POST should keep all the sent entries and not cut at 1000. PHP VERSION: 50305 Original data: 1010 POST DATA: 1032 Actual result: -------------- _POST truncates all above >1000 PHP VERSION: 50306 Original data: 1010 POST DATA: 1000 ERROR: POST count is smaller than original data count PHP VERSION: 50308 Original data: 1010 POST DATA: 1000 ERROR: POST count is smaller than original data count -- Edit bug report at https://bugs.php.net/bug.php?id=55810&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=55810&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=55810&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=55810&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=55810&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=55810&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=55810&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=55810&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=55810&r=needscript Try newer version: https://bugs.php.net/fix.php?id=55810&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=55810&r=support Expected behavior: https://bugs.php.net/fix.php?id=55810&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=55810&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=55810&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=55810&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=55810&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=55810&r=dst IIS Stability: https://bugs.php.net/fix.php?id=55810&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=55810&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=55810&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=55810&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=55810&r=mysqlcfg