Bug #14008: $_POST/$_FILES when uploaded file is too large
| From: | heyesr@php.net | Date: | Sat, 10 Nov 2001 14:12:48 +0000 |
| Subject: | Bug #14008: $_POST/$_FILES when uploaded file is too large | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-69973@lists.php.net to get a copy of this message | ||
From: heyesr@php.net
Operating system: RHL 7.1
PHP version: 4.0CVS-2001-11-10
PHP Bug Type: Unknown/Other Function
Bug description: $_POST/$_FILES when uploaded file is too large
Version is 4.2.0-dev.
When using the following script:
<?php
print_r($_POST);
print_r($_FILES);
if($_POST['submit']){
exit;
}else{
?>
<FORM ACTION="test.php" METHOd="POST"
ENCTYPE="multipart/form-data">
<INPUT TYPE="HIDDEN" NAME="hidden" VALUE="blah">
<INPUT TYPE="FILE" NAME="fileupload">
<INPUT TYPE="SUBMIT" NAME="submit">
</FORM>
<?php
}
?>
If an uploaded file is smaller than the limit, then it prints the stuff as
expected, however if the uploaded file is too large, then the _POST is
missing information and $_FILES is completely empty.
For example. If the file is ok, this is what I got printed:
Array
(
[hidden] => blah
[submit] => Submit Query
)
Array
(
[fileupload] => Array
(
[name] => expat-1.95.2.tar.gz
[type] => application/x-gzip-compressed
[tmp_name] => /tmp/phpQg7diG
[size] => 190316
)
)
And if the file is larger than 2Mb, this is what's printed:
Array
(
[hidden] => blah
)
Array
(
)
--
Edit bug report at: http://bugs.php.net/?id=14008&edit=1