#24326 [Bgs]: Bug of Upload files via PHP
| From: | pixxar at yandex dot ru | Date: | Fri, 27 Jun 2003 02:57:03 +0000 |
| Subject: | #24326 [Bgs]: Bug of Upload files via PHP | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-42611@lists.php.net to get a copy of this message | ||
ID: 24326
User updated by: pixxar at yandex dot ru
Reported By: pixxar at yandex dot ru
Status: Bogus
Bug Type: Filesystem function related
Operating System: Windows 2000 Professional
PHP Version: 4.3.3RC1
New Comment:
from my php.ini:
register_globals = On
upload_max_filesize = 8M
i'm increase max upload filesize in html form to
<input type="hidden" name="MAX_FILE_SIZE" value="2097152">
an d try again upload jpg-image (500Kb)
Not work. Strange... 500 Kb < 2097152 (2Mb).
I'm removed from html form MAX_FILE_SIZE and try again.
It's work!
Previous Comments:
------------------------------------------------------------------------
[2003-06-26 00:24:48] philip@php.net
Because register_globals = off, so those variables will not exist.
Post your new form to this:
<?php print_r($_FILES) ?>
------------------------------------------------------------------------
[2003-06-25 22:44:03] pixxar at yandex dot ru
After add 'enctype="multipart/form-data"' into <form> tag and
'<input
type="hidden" name="MAX_FILE_SIZE" value="30000">' betweeen
<form> and
</form> tags i'm try upload JPG-file via PHP. Result:
$userfile_tmp_name is empty
$userfile_name is empty
$userfile_size is empty
$userfile_type is empty
I'm copy example code of Upload files via PHP from PHP manual and paste
into my php-file. Result:
$userfile_tmp_name is empty
$userfile_name is empty
$userfile_size is empty
$userfile_type is empty
------------------------------------------------------------------------
[2003-06-24 23:16:14] pollita@php.net
Please refer to:
http://www.php.net/manual/en/features.file-upload.php
You forgot a form attribute.
------------------------------------------------------------------------
[2003-06-24 23:13:29] pixxar at yandex dot ru
Description:
------------
Bug of Upload files via PHP
Reproduce code:
---------------
<form action = "upload.php" method="POST">
<input type="file" name="userfile">
</form>
Actual result:
--------------
$userfile_tmp_name is empty
$userfile_name is empty
$userfile_size is empty
$userfile_type is empty
$usefile = filename with path of choosed file
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24326&edit=1