[PHP-DOC] #18286 [Opn->Csd]: UPLOAD_ERROR_X constants differ from documentation From: philip <email protected>
Date: 01/18/03

 ID: 18286
 Updated by: philip <email protected>
 Reported By: powerlord <email protected>
-Status: Open
+Status: Closed
 Bug Type: Documentation problem
 Operating System: Linux 2.4.x
 PHP Version: 4.3.0
 New Comment:

Empty files exist in $_FILES just the same, nothing to document here.
['size'] will be 0.

But anyway these new constants are documented.

Previous Comments:
------------------------------------------------------------------------

[2002-07-12 17:39:24] goba <email protected>

>From what version? They end up in files in 4.1.2/win as I have
experienced...

------------------------------------------------------------------------

[2002-07-12 17:31:41] sniper <email protected>

zero sized uploads -> no upload at all. Tey don't end up in the $_FILES
(anymore)
 

------------------------------------------------------------------------

[2002-07-12 16:59:19] powerlord <email protected>

Sounds great, but how about adding:

5 - UPLOAD_ERR_ZERO_SIZE - uploaded file is 0 bytes

I get the impression that error 5 hasn't been around long. :)

------------------------------------------------------------------------

[2002-07-12 00:52:20] sniper <email protected>

These constants exist as of today (in CVS):

value - constant name - description

0 - UPLOAD_ERR_OK - No errors, upload succesful
1 - UPLOAD_ERR_INI_SIZE - Filesize exceeded upload_max_filesize
2 - UPLOAD_ERR_FORM_SIZE - Filesize exceeded MAX_FILE_SIZE set in the
form
3 - UPLOAD_ERR_PARTIAL - File uploaded partially.
4 - UPLOAD_ERR_NO_FILE - No file uploaded.

If those names are not good, feel free to come up with
better ones. :)

------------------------------------------------------------------------

[2002-07-12 00:45:30] powerlord <email protected>

I see, they aren't constants at all, but error messages caught on
E_NOTICE. The way they are listed on the features.file-upload.errors
page (since it lists error numbers in reference to them) in association
with the value of $_FILES["userfile"]["error"] implies that they are
constants.

It would be really handy if $_FILES["userfile"]["error"] and
$userfile_error were mentioned in the features.file-upload section
along with the relevant error numbers.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/18286

-- 
Edit this bug report at http://bugs.php.net/?id=18286&edit=1

-- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php