php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18959 Non-existant file uploads return success error message
Submitted: 2002-08-17 16:52 UTC Modified: 2002-09-03 18:26 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: mikeharris at rogers dot com Assigned:
Status: Not a bug Package: HTTP related
PHP Version: 4.2.2 OS: Windows 98 SE
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mikeharris at rogers dot com
New email:
PHP Version: OS:

 

 [2002-08-17 16:52 UTC] mikeharris at rogers dot com
PHP v4.2.2 w/ Apache 1.3.22 on Windows 98 SE.

Re: Handling File Uploads

You can enter a path/filename that doesn't exist (or even gibberish) into a HTML <INPUT TYPE="file"> control and PHP will assign the corresponding $_FILES['foo']['error'] variable a value of 0, even though 0 indicates a successful upload.

Since the file didn't exist on the client machine, it couldn't possibly be uploaded to the server, but PHP creates a 0 byte temp file anyways.  Wouldn't it be more appropriate to assign the non-existant file upload an error code of 4, since nothing was actually uploaded?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-03 18:26 UTC] sniper@php.net
How could PHP know if the file exists in the users machine?
This is not bug but expected behaviour.

 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Aug 02 23:01:23 2021 UTC