ID: 27844 Comment by: snoj at equipesuissedubedo dot com Reported By: marco at opus dot ch Status: Bogus Bug Type: Unknown/Other Function Operating System: Windows 2000 PHP Version: 4.3.6RC1 New Comment:
Hi, when working with uploaded files that are smaller than 'upload_max_filesize' this works fine, but $_REQUEST is empty if the uploaded file is bigger than 'uploaded_max_filesize'. code: --------------------------------------------------------- <html> <body> <form action="newup.php" enctype="multipart/form-data" method="post"> <input type="hidden" name="SID" value="XXX"> <input type="file" name="test"> <input type="submit"> </form> </html> <?php print_r( $_REQUEST ); ?> --------------------------------------------------------- PHP 4.3.3 Previous Comments: ------------------------------------------------------------------------ [2004-04-09 15:44:02] marco at opus dot ch Yeah, it looks to be bogus ... the code I posted wasn't exactly the sample I was using. As mentioned, it wasn't just the request that was entirely empty, but also the post and files variables. I am no longer able to replicate it though ... seems to be working as advertised. Sorry to trouble you. ------------------------------------------------------------------------ [2004-04-04 13:57:20] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php The _REQEUST super-global does not include the data from $_FILES. If you print the $_FILES array you will see it contains the file entry with an error indicator. The $_POST and $_REQUEST both have the regular post fields filled in. ------------------------------------------------------------------------ [2004-04-02 13:32:45] marco at opus dot ch Description: ------------ I've got a form which uploads a file along with other information (including and ID that identifies location in the site). When I upload a file that exceeds the size limits, I get no $_FILES and no $_POST information. That means if the user chooses a large file, they are redirected to a 'not allowed to do that here' page instead of a form error, because the ID is missing and their request can't be validated. This bug has been documented in the user comments in the documentation, but is still in the latest release: http://php.planetmirror.com/manual/en/features.file-upload.common-pitfalls.php Reproduce code: --------------- <html> <body> <form action="test.html" enctype="multipart/form-data" method="post"> <input type="hidden" name="SID" value="XXX" <input type="file" name="test"> <input type="submit"> </form> </html> <?php print_r( $_REQUEST ); ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=27844&edit=1