From:             jon at hackcraft dot net
Operating system: 
PHP version:      Irrelevant
PHP Bug Type:     Documentation problem
Bug description:  MAX_FILE_SIZE erroneous.

Description:
------------
At
http://www.php.net/manual/en/features.file-upload.php#features.file-upload.post-method
and equivalent locations in other formats, it is stated that browsers take
the value of a MAX_FILE_SIZE form field into account.

This information is repeated elsewhere on the web and in books, but
appears to originate from the PHP documentation (it does not appear in
terms of other server-side technologies).

There is nothing in any of the HTML, HTTP or related specs to indicate
that this is the case (in particular RFC 1867 which introduced file
uploads to HTML doesn't mention it, so it isn't even a case of a kludge
that was mentioned in the first RFC and then dropped) nor does it make
sense in the context of the HTML specs (there is nothing to indicate any
relationship between that particular hidden input and the file input). The
only statements about hidden fields I could find in any of them was
warnings in the security considerations sections against user-agents
basing any file-related operations on anything mentioned in a hidden
field.

No browsers appear to perform this as an "extension". Indeed given that
there are potentially other possible meanings for a hidden field with that
name in an application handling several file uploads, it would have to be
considered a design flaw any any did.

I submit that there is no such mechanism in mainstream browsers (if any at
all) and indeed shouldn't be. Reference to it should be dropped from
documentation.

I'd further suggest that since this idea has propagated from this
documentation elsewhere that a note about it not working should to be
added.

If a mechanism is required or desired for more rapidly handling this sort
of file handling issue then it requires functionality to allow PHP to
intercept streams being uploaded before request completion, which would be
completely different to how this documentation suggest it should be dealt
with, even if it was true.


-- 
Edit bug report at http://bugs.php.net/?id=40387&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=40387&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=40387&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=40387&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=40387&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=40387&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=40387&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=40387&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=40387&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=40387&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=40387&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=40387&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=40387&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=40387&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=40387&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=40387&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=40387&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=40387&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=40387&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=40387&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=40387&r=mysqlcfg

Reply via email to