|  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
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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
16 - 10 = ?
Subscribe to this entry?

 [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>";
   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


Add a Patch

Pull Requests

Add a Pull Request


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]
Is there any pattern of files you can't upload? like,
are they always binary files that fail?


 [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">
 [2001-10-28 16:44 UTC]
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.


 [2001-11-18 10:05 UTC]
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-2020 The PHP Group
All rights reserved.
Last updated: Fri Nov 27 18:01:25 2020 UTC