Bug #11116 Updated: File upload sometimes work, sometimes fails
| From: | sniper@php.net | Date: | Sun, 28 Oct 2001 21:44:43 +0000 |
| Subject: | Bug #11116 Updated: File upload sometimes work, sometimes fails | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-69216@lists.php.net to get a copy of this message | ||
ID: 11116
Updated by: sniper
Reported By: hysteric@skynet.be
Old Status: Open
Status: Feedback
Bug Type: HTTP related
Operating System: win NT 4
PHP Version: 4.0.5
New Comment:
You're setting the maximum filesize to be 4096 bytes.
That might be the reason for the uploads to fail?
Not many normal files are that small.
--Jani
Previous Comments:
------------------------------------------------------------------------
[2001-06-01 04:33:14] hysteric@skynet.be
It seems that binary files always fail and others sometimes fail.
I thought it could be wise to add the submit form I use.
<form ENCTYPE="multipart/form-data" action="<? $PHP_SELF ?>"
method="post">
<input type="hidden" name="typePub" value="file">
<input type="hidden" name="MAX_FILE_SIZE" value="4096">
<input type="file" name="leFichier">
...
</form>
------------------------------------------------------------------------
[2001-05-31 22:53:09] sniper@php.net
Is there any pattern of files you can't upload? like,
are they always binary files that fail?
--Jani
------------------------------------------------------------------------
[2001-05-29 03:26:55] hysteric@skynet.be
Tried php 4.0.5 => same problem.
I can *sometimes* upload files, *sometimes* i can't!?
------------------------------------------------------------------------
[2001-05-25 11:37:36] hysteric@skynet.be
I followed the method in the online manual to set up a small file upload.
It works well with some files and fails with some others!
if (is_uploaded_file($uploadedFile))
{
echo "UPLOAD OK<br>";
...
}
else
{
echo "upload KO";
}
I try to rename the files.
I tried with files in my c:\ root dir.
(local system: winMe)
Some will get uploaded some wont!?
Tried long/short names
Files are about 1-10k large for testing purpose
Are there any upload rules ?
Thanks in advance
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=11116&edit=1