#18959 [Opn->Bgs]: Non-existant file uploads return success error message

From: Date: Tue, 03 Sep 2002 23:26:18 +0000
Subject: #18959 [Opn->Bgs]: Non-existant file uploads return success error message
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-18360@lists.php.net to get a copy of this message
ID: 18959 Updated by: sniper@php.net Reported By: mikeharris@rogers.com -Status: Open +Status: Bogus Bug Type: HTTP related Operating System: Windows 98 SE PHP Version: 4.2.2 New Comment: How could PHP know if the file exists in the users machine? This is not bug but expected behaviour. Previous Comments: ------------------------------------------------------------------------ [2002-08-17 16:52:37] mikeharris@rogers.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? ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18959&edit=1

« previous php.bugs (#18360) next »