ID: 14008 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Old Status: Feedback Status: Open Bug Type: Unknown/Other Function Operating System: RHL 7.1 PHP Version: 4.0CVS-2001-11-10 Old Assigned To: hholzgra Assigned To: New Comment:
> so what do you expect? > > the file is to big, so it is rejected It would be nice to get some sort of confirmation that the file was rejected and why, instead of having to guess. > and the submit button is most likely > placed after the file input in the form > so its data comes after the file data in > the post so its behind the limit, too ... This is just plain wrong. What about other form data that comes after the file? If I'm to redirect the user back to the form because the file was too large, I don't want them to have to retype stuff unnecessarily. Previous Comments: ------------------------------------------------------------------------ [2001-11-10 09:18:51] [EMAIL PROTECTED] so what do you expect? the file is to big, so it is rejected and the submit button is most likely placed after the file input in the form so its data comes after the file data in the post so its behind the limit, too ... ------------------------------------------------------------------------ [2001-11-10 09:12:47] [EMAIL PROTECTED] 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 this bug report at http://bugs.php.net/?id=14008&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]