ID:               50749
 Updated by:       j...@php.net
 Reported By:      anzenews at volja dot net
-Status:           Open
+Status:           Bogus
 Bug Type:         PHP options/info functions
 Operating System: Linux
 PHP Version:      5.2.12
 New Comment:

Of course it does, that's exactly it's purpose: to limit maximum number
of uploads. And yes, even "empty" upload is an upload.


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

[2010-01-14 13:46:53] anzenews at volja dot net

Description:
------------
Setting max_file_uploads limits the number of file input fields on HTML
page instead of limiting the number of actually uploaded files.

Reproduce code:
---------------
<form name="formData" action="" enctype="multipart/form-data"
method="post">
<?php
 for ($i=0;$i<30;$i++)
 {
   echo "File ".($i+1).":<br />\n".
        '<input name="file_'.$i.'" type="file" /><br />'."\n";
 };
?>
 <input value="OK!" type="submit" />
</form>

<pre>
<?php var_dump($_FILES) ;?>
</pre>

Expected result:
----------------
When you upload a single file (in the LAST!!! input box) and hit "OK!",
you should see the uploaded file. 

Actual result:
--------------
Instead you see just 20 empty file uploads. (if max_file_uploads is set
to 20, as per default)

The max_file_uploads setting should never count empty files. 


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


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

Reply via email to