|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62535 $_SESSION[$key]["cancel_upload"] doesn't work as documented
Submitted: 2012-07-11 16:56 UTC Modified: 2013-06-27 18:58 UTC
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: danny at tibibi dot com Assigned: arpad
Status: Closed Package: Session related
PHP Version: 5.4.4 OS: Windows Server 2008
Private report: No CVE-ID:
 [2012-07-11 16:56 UTC] danny at tibibi dot com
The documentation - -for the Session Upload Progress feature says that if you set $_SESSION[$key]["cancel_upload"] to TRUE, then it will cancel the current file being processed, and all pending files.

This is not what I am experiencing. Instead, it cancels the current file, but the pending files still go through, unless you set $_SESSION[$key]["cancel_upload"] to TRUE again and again at the time that each file is being processed.

Also, what I understood from the documentation is that if you set $_SESSION[$key]["cancel_upload"] to TRUE, then it stops the current file and all pending files, therefore stopping the request from processing any further. I'm not sure if I'm right in assuming this, but it is definitely not the case. Instead, the complete request finishes (this could be long if the files are large), and then the $_FILES array has its error set to UPLOAD_ERR_EXTENSION for all files that were canceled.

It would be nice if setting $_SESSION[$key]["cancel_upload"] to TRUE actually stopped the request entirely from being processed any further, so this way it could save the user from waiting long periods of time for nothing.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-06-27 18:25 UTC]
Automatic comment on behalf of
Log: Fix bug #62535 - $_SESSION[$key]["cancel_upload"] doesn't work as documented
 [2013-06-27 18:25 UTC]
-Status: Open +Status: Closed
 [2013-06-27 18:58 UTC]
-Assigned To: +Assigned To: arpad
 [2013-06-27 18:58 UTC]
Regarding stopping the request entirely, we have to wait until the request is finished (and continue to process it in case there's more form data) before sending the response so that's not possible.
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Thu Apr 17 03:01:55 2014 UTC