php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62738 max_input_vars and stream upload
Submitted: 2012-08-03 12:07 UTC Modified: 2012-10-31 15:06 UTC
Votes:3
Avg. Score:3.7 ± 0.5
Reproduced:3 of 3 (100.0%)
Same Version:3 (100.0%)
Same OS:2 (66.7%)
From: david at davidsteinsland dot net Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.4.5 OS: CentOS 6.2
Private report: No CVE-ID: None
 [2012-08-03 12:07 UTC] david at davidsteinsland dot net
Description:
------------
When I try to upload files from Java through PHP, the logs give me messages about:
Input variables exceeded 6000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0.

Test script:
---------------
// read file contents from stream, and copy into a temporary file in order to get filesize
$putdata = fopen("php://input", "r");
$tmp = tmpfile();
$filesize = stream_copy_to_stream ($putdata, $tmp);
fclose ($putdata);

// move file to correct position
$target = fopen($filepath, "w");        
fseek($tmp, 0, SEEK_SET);
stream_copy_to_stream($tmp, $target);
fclose($target);
fclose ($tmp);

Actual result:
--------------
Input variables exceeded 6000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-10-31 10:06 UTC] david at davidsteinsland dot net
The solution was posted recently on Stackoverflow:
http://stackoverflow.com/a/13089138/414414

The directive "enable_post_data_reading" was set to "Off", to prevent PHP from parsing the input data and populating $_POST and $_FILES. The max_input_vars does not need to be incremented.
 [2012-10-31 10:07 UTC] david at davidsteinsland dot net
The solution was posted recently on Stackoverflow:
http://stackoverflow.com/a/13089138/414414

The directive "enable_post_data_reading" was set to "Off", to prevent PHP from parsing the input data and populating $_POST and $_FILES. The max_input_vars does not need to be incremented.
 [2012-10-31 10:07 UTC] david at davidsteinsland dot net
-Status: Open +Status: Closed
 [2012-10-31 15:06 UTC] rasmus@php.net
-Status: Closed +Status: Not a bug
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 13 20:01:33 2025 UTC