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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 18:01:29 2024 UTC