php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64451 Posted array will disappear
Submitted: 2013-03-19 03:07 UTC Modified: 2013-03-19 04:30 UTC
From: ta_chi at nyc dot odn dot ne dot jp Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.3.23 OS: Win32
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ta_chi at nyc dot odn dot ne dot jp
New email:
PHP Version: OS:

 

 [2013-03-19 03:07 UTC] ta_chi at nyc dot odn dot ne dot jp
Description:
------------
------------------
Steps to reproduce
------------------
Run the code below, and then press the "submit" button.


------------------
Results of expect
------------------
I hope that "count($_POST['test'])" is "10000".However, the return value of the 
function was "0".
Variable "i" to this problem reproduce is "334" or over.


Test script:
---------------
Please submit button.
<?=ini_get('post_max_size')?><br />
1456669==<?=$_SERVER['CONTENT_LENGTH']?><br />
10000==<?=count($_POST['test'])?><br />

<form method="POST" action="" >
<?php
//333OK 334NG
for ($i=0; $i < 10000; $i++) {

    ?>
    <input name="test[<?=$i?>]" value="<?=md5($i)?>" type="hidden" />
    <input name="test2[<?=$i?>]" value="<?=md5($i)?>" type="hidden" />
    <input name="test3[<?=$i?>]" value="<?=md5($i)?>" type="hidden" />
    <?php
}

?>
    <input type="submit" />
</form>

Expected result:
----------------
count($_POST['test'])
-> 10000

Actual result:
--------------
count($_POST['test'])
-> 0

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-03-19 03:18 UTC] rasmus@php.net
You are hitting max_input_vars - increase it in your php.ini if you want to 
support that many. This was restricted for security reasons to avoid hash-
collision DoS attacks.
 [2013-03-19 03:18 UTC] rasmus@php.net
-Status: Open +Status: Not a bug
 [2013-03-19 04:30 UTC] ta_chi at nyc dot odn dot ne dot jp
Oh, thank you.
Setting the max_input_vars, worked as expected!

Sorry for the hassle.
 [2013-03-19 04:30 UTC] ta_chi at nyc dot odn dot ne dot jp
-: tachi dot koichi at gmail dot com +: ta_chi at nyc dot odn dot ne dot jp
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 06 15:01:30 2025 UTC