FAQ
ID: 49983
Updated by: sniper@php.net
Reported By: dgrace at wingsnw dot com
-Status: Open
+Status: Feedback
-Bug Type: Unknown/Other Function
+Bug Type: *General Issues
Operating System: Debian Linux
PHP Version: 5.2.11
New Comment:

Obviously it's some misconfiguration / limitation of your server
setup:
"$_POST contained 10001 out of 10000 variable(s)"

You should check your error logs, php.ini for post_max_size and
especially the webserver setting you use. I tried with lighttpd + PHP
(FastCGI) and had no problems.




Previous Comments:
------------------------------------------------------------------------

[2009-10-24 01:51:51] dgrace at wingsnw dot com

Description:
------------
PHP will quietly discard variables POSTed to a form after the 1000th
posted variable. This value seems to be consistent and is not affected
by post_max_size.

I've searched the documentation about php.ini directives and could not
find anything suggesting this limit can be changed.

This is especially problematic if presenting a list of items to be
selected by the user (i.e. listing 1000+ items with an option to delete
the selected items). The discard occurs regardless of the POST variable
names -- i.e. if they are all named "id[]" to convert to an array, the
failure will still happen.

Tested with both IE7 and FF3.5.3 to confirm that it was not a browser
limitation.

Tested on Apache/2.2.13 (Debian)

Reproduce code:
---------------
<?php
/* Test case for bug report: See how many POST variables make it back
to PHP. */
error_reporting(E_ALL);

$numvars = 10000;
echo '<html><body>';

echo '<p>$_POST contained ', ((int) @count($_POST)), ' out of ',
$numvars, ' variable(s)</p>';

echo "<form action=\"?\" method=\"post\">";
for($n = 0 ; $n < $numvars; ++$n) { echo '<input type="hidden"
name="v', $n, '" value="0" />'; }
echo '<input type="submit" name="submit" value="Run Test" />';
echo '</form>';
echo '</body></html>';


Expected result:
----------------
After submitting the form once, 10001 out of 10000 variables (since the
submit button itself is an additional _POST variable, the count would be
off in this case)

Actual result:
--------------
1000 of 10000 variables


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=49983&edit=1

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 3 | next ›
Discussion Overview
groupphp-bugs @
categoriesphp
postedOct 24, '09 at 1:51a
activeOct 24, '09 at 9:55p
posts3
users2
websitephp.net

People

Translate

site design / logo © 2018 Grokbase