php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #48437 Documentation overstates MAX_FILE_SIZE hidden field
Submitted: 2009-05-31 05:14 UTC Modified: 2010-07-21 17:24 UTC
Votes:2
Avg. Score:3.5 ± 0.5
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: phpbugreport at strokerville dot com Assigned: aharvey (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: linux
Private report: No CVE-ID: None
 [2009-05-31 05:14 UTC] phpbugreport at strokerville dot com
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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-23 04:10 UTC] svn@php.net
Automatic comment from SVN on behalf of danbrown
Revision: http://svn.php.net/viewvc/?view=revision&revision=284632
Log: Addresses Bug #48437 by rewording the documentation.
 [2009-07-23 04:11 UTC] danbrown@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 [2010-07-21 16:03 UTC] tom at punkave dot com
This is still around in this page:

http://www.php.net/manual/en/features.file-upload.post-method.php

It's been over a year, so it sounds like something didn't make it.
 [2010-07-21 17:24 UTC] aharvey@php.net
-Assigned To: +Assigned To: aharvey
 [2010-07-21 17:24 UTC] aharvey@php.net
The text that was added is on the POST method uploads page: specifically in the last grey block in example #1.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 20 06:01:34 2024 UTC