Re: PHP 4.0 Bug #8700: File upload does not work at all.
| From: | Jon Tai | Date: | Sun, 14 Jan 2001 21:16:55 +0000 |
| Subject: | Re: PHP 4.0 Bug #8700: File upload does not work at all. | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-44072@lists.php.net to get a copy of this message | ||
My best guess is that you're trying to uploading a file bigger than 1000
bytes (only 1k). In my experience, the browser doesn't actually send the
file if it's bigger than MAX_FILE_SIZE. In my scripts, I use:
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo ((int)
get_cfg_var("upload_max_filesize"))*1024*1024; ?>">
so that MAX_FILE_SIZE is always consistent with what php.ini allows.
- Jon
----- Original Message -----
From: <nautica@clanman.com>
To: <php-dev@lists.php.net>
Sent: Sunday, January 14, 2001 12:14 PM
Subject: [PHP-DEV] PHP 4.0 Bug #8700: File upload does not work at all.
From: nautica@clanman.com
Operating system: Redhat 7.1 with 2.4.0 Kernel
PHP version: 4.0.4pl1
PHP Bug Type: Unknown/Other Function
Bug description: File upload does not work at all.
-- test.php --
<FORM ENCTYPE="multipart/form-data" ACTION="test_upload.php" METHOD=POST>
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000">
Send this file: <INPUT NAME="userfile" TYPE="file">
<INPUT TYPE="submit" VALUE="Send File">
</FORM>
-- test_upload.php --
<?php
if (is_uploaded_file($userfile)) {
copy($userfile, "/tmp/testupload");
} else {
echo "Possible file upload attack: filename '$userfile'.";
}
?>
Browser sends file..
but above script reports
Possible file upload attack: none
everytime you upload a file.. file is not to be found anywhere on the
system.
--
Edit Bug report at: http://bugs.php.net/?id=8700&edit=1
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
For additional commands, e-mail: php-dev-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net