php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11116 File upload sometimes work, sometimes fails
Submitted: 2001-05-25 11:37 UTC Modified: 2001-11-18 10:05 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: hysteric at skynet dot be Assigned:
Status: Closed Package: HTTP related
PHP Version: 4.0.5 OS: win NT 4
Private report: No CVE-ID: None
 [2001-05-25 11:37 UTC] hysteric at skynet dot 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-29 03:26 UTC] hysteric at skynet dot be
Tried php 4.0.5 => same problem.
I can *sometimes* upload files, *sometimes* i can't!?
 [2001-05-31 22:53 UTC] sniper@php.net
Is there any pattern of files you can't upload? like,
are they always binary files that fail?

--Jani

 [2001-06-01 04:33 UTC] hysteric at skynet dot 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-10-28 16:44 UTC] sniper@php.net
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

 [2001-11-18 10:05 UTC] sander@php.net
No feedback. Closing.
 [2002-03-07 11:30 UTC] Juric at netmail dot lv
I have got the same problem... I'm using php4.1.0 as a module of apache... with file size all it is OK, but sometimes upload fails, sometimes do not... more often fails than not...
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Oct 22 14:01:27 2019 UTC