php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62317 Session upload progress returns empty array if files larger than post_max_size
Submitted: 2012-06-13 20:27 UTC Modified: 2013-06-27 19:19 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:0 of 0 (0.0%)
From: scott at phphq dot net Assigned:
Status: Wont fix Package: Session related
PHP Version: 5.4.3 OS: Win Server 2003 x86 / IIS 6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: scott at phphq dot net
New email:
PHP Version: OS:

 

 [2012-06-13 20:27 UTC] scott at phphq dot net
Description:
------------
I am submitting this as a bug because PHP will instantly return an empty $_SESSION 
array if the file size sum of all uploaded files is larger than allowed by 
post_max_size or upload_max_filesize even though the browser continues to upload. 
I would expect that PHP would automatically cancel these uploads, or at least 
return an error so I can use $_SESSION[key]['cancel_upload']; myself. 

I'm on PHP 5.4.3, Win Server 2003 x86, IIS6 as fast_cgi. 
session.upload_progress.cleanup is turned off so I could try and debug this. It's 
not happening because of the cleanup process.

Test script:
---------------
Here is what you can use to duplicate the issue:
http://phphq.net/_upbug/

Expected result:
----------------
I would expect some sort of error.

Actual result:
--------------
Null responce

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-06-27 19:19 UTC] arpad@php.net
-Status: Open +Status: Wont fix
 [2013-06-27 19:19 UTC] arpad@php.net
When files exceed upload_max_filesize, the progress data does return an error. 

However when the content length of the request exceeds post_max_size, a warning is raised and all upload processing is skipped.

In order to provide errors in the progress data in this case, we'd have to keep processing the request just to find out if there's any files to report the errors on.

If you're regularly checking the progress data, it would make sense to consider the absence of any progress data after a certain threshold, an error in itself.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 06:01:30 2024 UTC