Bug #75650 [Com]: Why this warning? "Cannot change session name when session is active"?
| From: | spam2 at rhsoft dot net | Date: | Thu, 07 Dec 2017 18:37:45 +0000 |
| Subject: | Bug #75650 [Com]: Why this warning? "Cannot change session name when session is active"? | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-213006@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75650&edit=1
ID: 75650
Comment by: spam2 at rhsoft dot net
Reported by: david dot stoeckl at blackbam dot at
Summary: Why this warning? "Cannot change session name when
session is active"?
Status: Open
Type: Bug
Package: Session related
PHP Version: 7.2.0
Block user comment: N
Private report: N
New Comment:
because it never worked how you did think it worked but just silent
session_name(self::$name); // this is line 137
session_set_cookie_params(0, COOKIEPATH, null, self::$force_ssl_cookie, true);
both are nonsense when the session is already running
> according to the docs with session_name I could change sessions and start multiple sessions
where is that statet and how should that work since the session is tied to the session cookie?
> unset($_COOKIE[session_name()]);
> session_destroy();
what is that and why?
$_SESSION = array();
session_destroy();
and leave the cookie alone!
Previous Comments:
------------------------------------------------------------------------
[2017-12-07 18:20:55] david dot stoeckl at blackbam dot at
Description:
------------
Please have a look at the following discussion: https://stackoverflow.com/questions/47700336/php-7-2-warning-cannot-change-session-name-when-session-is-active
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75650&edit=1