php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #76808 session upload progress not available when session name is customized w/ini_set
Submitted: 2018-08-29 09:01 UTC Modified: 2018-08-29 15:48 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: samuel dot chemla at orange dot com Assigned: cmb (profile)
Status: Closed Package: Session related
PHP Version: 7.2.9 OS: Windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: samuel dot chemla at orange dot com
New email:
PHP Version: OS:

 

 [2018-08-29 09:01 UTC] samuel dot chemla at orange dot com
Description:
------------
I'm using session upload progress exactly as described here :
http://php.net/manual/en/session.upload-progress.php

It works when session has it's default name (PHPSESSID).
If you customize the session name it won't work ($_SESSION won't contain the upload_progress_ stuff)

Test script:
---------------
Run the http://php.net/manual/en/session.upload-progress.php test:
1) With default session options
2) With ini_set('session.name', 'foo') before starting the session

Expected result:
----------------
$_SESSION["upload_progress_123"] should be available

Actual result:
--------------
$_SESSION["upload_progress_123"] is not set

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-08-29 09:03 UTC] samuel dot chemla at orange dot com
I just saw there was a similar user comment on the manual page http://php.net/manual/en/session.upload-progress.php :

```
It seems like defining a session name before starting the session makes the $_SESSION['upload_progress...'] not to work any more !

session_name('session');
session_start();

(in both the upload page, and the XHR request)
```
 [2018-08-29 14:06 UTC] requinix@php.net
-Summary: session upload progress not available when session name is customized +Summary: session upload progress not available when session name is customized w/ini_set -Status: Open +Status: Verified -Type: Bug +Type: Documentation Problem
 [2018-08-29 14:06 UTC] requinix@php.net
Uploads are processed before any scripts execute. Changing the session name with ini_set cannot possibly work.
 [2018-08-29 14:49 UTC] samuel dot chemla at orange dot com
Thanks for the explanation.
This should be explained in the documentation because it's not that trivial.
 [2018-08-29 15:48 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&revision=345567
Log: Fix #76808: session upload progress not available when session name is customized w/ini_set

This also integrates user note 118866.
 [2018-08-29 15:48 UTC] cmb@php.net
-Status: Verified +Status: Closed -Assigned To: +Assigned To: cmb
 [2018-08-29 15:48 UTC] cmb@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 [2018-08-30 06:59 UTC] samuel dot chemla at orange dot com
Thanks!
 [2020-02-07 06:05 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=4a53dba08d2e39162c78a4b314fcd266436f4d20
Log: Fix #76808: session upload progress not available when session name is customized w/ini_set
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 03:01:28 2024 UTC