Bug #62738 [Csd->Nab]: max_input_vars and stream upload
| From: | rasmus@php.net | Date: | Wed, 31 Oct 2012 15:06:20 +0000 |
| Subject: | Bug #62738 [Csd->Nab]: max_input_vars and stream upload | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-174442@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=62738&edit=1
ID: 62738
Updated by: rasmus@php.net
Reported by: david at davidsteinsland dot net
Summary: max_input_vars and stream upload
-Status: Closed
+Status: Not a bug
Type: Bug
Package: Scripting Engine problem
Operating System: CentOS 6.2
PHP Version: 5.4.5
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2012-10-31 10:07:04] 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:06:15] 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-08-03 12:07:12] 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.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=62738&edit=1