Bug #52239 [Opn->Bgs]: Maximum 127 form fields
| From: | rasmus@php.net | Date: | Fri, 02 Jul 2010 22:40:56 +0000 |
| Subject: | Bug #52239 [Opn->Bgs]: Maximum 127 form fields | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-152047@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52239&edit=1
ID: 52239
Updated by: rasmus@php.net
Reported by: derek at darkcolors dot com
Summary: Maximum 127 form fields
-Status: Open
+Status: Bogus
Type: Bug
Package: Arrays related
Operating System: Linux
PHP Version: 5.3.2
New Comment:
There is no such limit in PHP. All I can think of is that your browser
limits
the number of upload fields. I tested this in Firefox and it worked
fine both
for 1000 text fields and 1000 file upload fields.
My test case looked like this:
<?php
print_r($some_file);
?>
<form action="ff.php" method="POST">
<input type=submit>
<input type="text" name="some_file[]"
value="/Users/rasmus/foo.txt">
...999 more identical lines...
</form>
And my output was:
Array ( [0] => /Users/rasmus/foo.txt [1] => /Users/rasmus/foo.txt [2] =>
/Users/rasmus/foo.txt [3] => /Users/rasmus/foo.txt [4] =>
/Users/rasmus/foo.txt
[5] => /Users/rasmus/foo.txt
...
[995] => /Users/rasmus/foo.txt [996] => /Users/rasmus/foo.txt [997] =>
/Users/rasmus/foo.txt [998] => /Users/rasmus/foo.txt [999] =>
/Users/rasmus/foo.txt
Since there is no 128 field limit in the code and it works perfectly for
me
against PHP 5.3.2 running on Linux as in your report, I am pretty sure
this is
not a PHP issue. Try another browser or look for other causes.
Previous Comments:
------------------------------------------------------------------------
[2010-07-03 00:20:47] derek at darkcolors dot com
Description:
------------
If an html form contains more than 127 fields, any additional fields
will not
appear in $_POST, $_GET, $_POST, $_FILES. Now will it appear as the
actual
variable name if register globals is on. SUHOSIN is not turned on. I'm
sending
the form as POST. No error is reported anywhere.
Test script:
---------------
<form action="manage_site" method="post"
enctype="multipart/form-data">
<input type="file" name="some_file[]>
<input type="file" name="some_file[]>
<input type="file" name="some_file[]>
......
<input type="file" name="some_file[]>
<input type="submit">
</form>
--------------------------
print_r($_FILES[some_file]); // Will post only info for the first 127
files.
Expected result:
----------------
PHP should accept an unlimited number of form fields and return them as
the usual
variables--or at least give a way for us to overrule this default limit
of 127
fields.
Actual result:
--------------
Only the first 127 array elements are saved form an html form POST.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52239&edit=1