Doc #76808 [Com]: session upload progress not available when session name is customized w/ini_set
| From: | samuel dot chemla at orange dot com | Date: | Wed, 29 Aug 2018 14:49:52 +0000 |
| Subject: | Doc #76808 [Com]: 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-15961@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
Comment by: samuel dot chemla at orange dot com
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
Type: Documentation Problem
Package: Session related
Operating System: Windows
PHP Version: 7.2.9
Block user comment: N
Private report: N
New Comment:
Thanks for the explanation.
This should be explained in the documentation because it's not that trivial.
Previous Comments:
------------------------------------------------------------------------
[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