Bug #16740 Updated: HTTP_POST_FILES not functioning w/ certain browsers
| From: | sniper@php.net | Date: | Tue, 23 Apr 2002 05:08:24 +0000 |
| Subject: | Bug #16740 Updated: HTTP_POST_FILES not functioning w/ certain browsers | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-5631@lists.php.net to get a copy of this message | ||
ID: 16740
Updated by: sniper@php.net
Reported By: vjl@uci.edu
-Status: Open
+Status: Bogus
Bug Type: HTTP related
Operating System: Linux: 2.4.3 [Mandrake 8.0]
PHP Version: 4.1.2
New Comment:
The version of PHP that this bug was reported in is too old. Please
try to reproduce this bug in the latest version of PHP (available
from http://www.php.net/downloads.php
If you are still able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Previous Comments:
------------------------------------------------------------------------
[2002-04-23 00:46:40] vjl@uci.edu
When running this code:
##-- upload_test1.html --##
<html><head><title>upload test</title></head>
<body>
<FORM ENCTYPE="multipart/form-data" METHOD="POST"
ACTION="upload_test2.php">
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
<INPUT TYPE="FILE" NAME="vita" SIZE="30"
MAXLENGTH="58">
<INPUT TYPE="submit" NAME="update" VALUE="Commit Changes">
<INPUT TYPE="RESET" NAME="Reset" VALUE="Reset Changes">
</form>
</body></html>
##-- upload_test2.php --##
<?php
if ($HTTP_POST_FILES['vita']['tmp_name'] != 'none')
{
echo "a file was uploaded";
}
else
{
echo "nothing was uploaded";
}
?>
Different results depending on the browser one is using. If one uses
Galeon 1.2.0 under Linux or Mozilla 0.99 under linux, and one presses
the "commit" button WITHOUT uploading a file, the resulting page will
display "a file was uploaded". This is due to the fact that tmp_name is
equal to "" instead of "none" which it is supposed to be equal to.
If one does upload a file, using galeon, tmp_file does get defined as
it should.
/vjl/
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=16740&edit=1