From:             krudtaa at yahoo dot com
Operating system: Win XP
PHP version:      6CVS-2008-11-09 (snap)
PHP Bug Type:     Unknown/Other Function
Bug description:  Files are uploaded even if larger than upload_max_filesize 
and post_max_size 

Description:
------------
If you try to upload file(s) to the server and the files are larger than
specified in upload_max_filesize and post_max_size then it looks like the
files are uploaded to the server.

I have tested this on a file that was 100M large and where
upload_max_filesize and post_max_size where set to 55M.

I see that the time before the script is beeing loaded after submission is
approx the same regardless if the uploaded files are larger or smaller than
what is specified in upload_max_filesize and post_max_size.

It would be nice to see a fix for this issue, since I do not see why the
server should use resources on uploading the file(s) if it does not meet
the criteria set in upload_max_filesize and post_max_size.
I belive PHP should abort the upload immediately when the form is beeing
submitted and that it should be possible to detect what the reason for the
bailout was in the script.

I have tested Arnaud Le Blanc's "Upload progress in sessions" patch which
can be found here:
http://wiki.php.net/rfc/session_upload_progress

When the filesize was to large both the files array is empty and the
session variable created by Arnaud's "Upload progress in sessions" are not
created.

I do not belive Arnaud's patch is the cause for this though, mainly
because of the feedback in this thread:
http://pecl.php.net/bugs/bug.php?id=9330&edit=1

Hope someone can fix this ASAP both in the upcoming PHP 6.0 version as
well as in next versions of PHP 5.3


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

Reply via email to