Doc #76808 [Ver->Csd]: session upload progress not available when session name is customized w/ini_set
| From: | cmb@php.net | Date: | Wed, 29 Aug 2018 15:48:37 +0000 |
| Subject: | Doc #76808 [Ver->Csd]: session upload progress not available when session name is customized w/ini_set | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-15963@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76808&edit=1
ID: 76808
Updated by: cmb@php.net
Reported by: samuel dot chemla at orange dot com
Summary: session upload progress not available when session
name is customized w/ini_set
-Status: Verified
+Status: Closed
Type: Documentation Problem
Package: Session related
Operating System: Windows
PHP Version: 7.2.9
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2018-08-29 15:48:12] 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 14:49:52] 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 14:06:20] requinix@php.net
Uploads are processed before any scripts execute. Changing the session name with ini_set cannot
possibly work.
------------------------------------------------------------------------
[2018-08-29 09:03:37] 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 09:01:18] 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
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76808&edit=1