#48437 [NEW]: Documentation overstates MAX_FILE_SIZE hidden field

From: Date: Sun, 31 May 2009 05:14:24 +0000
Subject: #48437 [NEW]: Documentation overstates MAX_FILE_SIZE hidden field
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-2321@lists.php.net to get a copy of this message
From: phpbugreport at strokerville dot com Operating system: linux PHP version: Irrelevant PHP Bug Type: Documentation problem Bug description: Documentation overstates MAX_FILE_SIZE hidden field Description: ------------ I spend the better part of a day trying to find what I'd done wrong to prevent the following feature from working: "This form element should always be used as it saves users the trouble of waiting for a big file being transferred only to find that it was too big and the transfer failed." http://www.php.net/manual/en/features.file-upload.post-method.php From what I found searching online, including this previous bug: http://bugs.php.net/bug.php?id=40387 it seems this hidden input field does nothing at all to prevent an over sized file from being uploaded. Unless what I've read is incorrect, my suggestion is to remove the above quoted text from the documentation so that others do not waste their time trying to make it work as stated. Thank you for all the great work everyone! Reproduce code: --------------- <form enctype="multipart/form-data" action="__URL__" method="POST"> <!-- MAX_FILE_SIZE must precede the file input field --> <input type="hidden" name="MAX_FILE_SIZE" value="30000" /> <!-- Name of input element determines name in $_FILES array --> Send this file: <input name="userfile" type="file" /> <input type="submit" value="Send File" /> </form> Expected result: ---------------- "This form element should always be used as it saves users the trouble of waiting for a big file being transferred only to find that it was too big and the transfer failed." Actual result: -------------- File uploads completely. -- Edit bug report at http://bugs.php.net/?id=48437&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48437&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48437&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48437&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48437&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48437&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48437&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48437&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48437&r=needscript Try newer version: http://bugs.php.net/fix.php?id=48437&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48437&r=support Expected behavior: http://bugs.php.net/fix.php?id=48437&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48437&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48437&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48437&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48437&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=48437&r=dst IIS Stability: http://bugs.php.net/fix.php?id=48437&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48437&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48437&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48437&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48437&r=mysqlcfg

« previous php.doc.bugs (#2321) next »