php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71293 File upload is not cancelled using session.upload_progress
Submitted: 2016-01-05 23:24 UTC Modified: 2021-07-04 04:22 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: pfenderd at bellsouth dot net Assigned: cmb (profile)
Status: No Feedback Package: Session related
PHP Version: 7.0.1 OS: Windows 7
Private report: No CVE-ID: None
 [2016-01-05 23:24 UTC] pfenderd at bellsouth dot net
Description:
------------
According to the PHP documentation about session.upload.progress, a file upload can be cancelled by setting
$_SESSION[$key]["cancel_upload"] = TRUE;

As far as PHP session data is concerned, the upload was cancelled and the data in $_FILES indicates that no file data is avaliable.

However, according to my network monitor the browser does not stop sending the file.  It sends the entire file even though the transfer should have stopped.  That means that the form processing cannot continue to the next step until all the file data has been uploaded, which could be several minutes for a large file.

Either this is a bug in the code that needs to be fixed or the documentation should be fixed to say that the upload will not be stopped but the file data will not be available because of the cancel request.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-01-07 07:11 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2016-01-07 07:11 UTC] ab@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.


 [2016-01-17 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 [2016-01-17 22:18 UTC] pfenderd at bellsouth dot net
-Status: No Feedback +Status: Closed
 [2016-01-17 22:18 UTC] pfenderd at bellsouth dot net
To demonstrate the problem, I have made available a set of 4 files that can be downloaded from http://upz.djpnet.dyndns.org/upz.zip

This problem cannot be explained with just a short piece of code.
 [2016-02-19 05:13 UTC] pfenderd at bellsouth dot net
-Status: Closed +Status: Assigned
 [2016-02-19 05:13 UTC] pfenderd at bellsouth dot net
I added a link for files to demonstrate the problem.
 [2017-10-24 06:05 UTC] kalle@php.net
-Status: Assigned +Status: Open
 [2021-06-24 14:18 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-06-24 14:18 UTC] cmb@php.net
Which SAPI and Webserver are (were) you using?  At least for FCGI
the upload progress features won't properly work, if the Webserver
buffers the request.
 [2021-07-04 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 14 22:01:31 2024 UTC