|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2015-02-07 16:56 UTC] simon_freedom125 at hotmail dot com
Description:
------------
The actual version of php is actually 5.6.3
The session does not persist when I set cookie for the session id to last not until the browser is closed. example, to last for a day.
When the session id is set to last until the browser is closed, the session start works on subsequent page request.
Tested on 3 browsers - chrome, mozilla, and IE. This only happens on IE.
realized this problem after upgrading from php 5.4+
I used the session_name function to change the default, so I am not using PHPSESSID. Not sure what is the actual cause.
Test script:
---------------
session_name('sessionID');
setcookie('sessionID',$sessionID,time()+3600*24,'/',NULL,true);
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 20 23:00:01 2025 UTC |
Regardless of session.use_strict_mode, following code should work session_name('MYSESS1'); session_id('2342424234242424323423'); session_set_cookie_params( some params); session_start(); //do something. Copy $_SESSION to other var, if needed. session_commit(); session_name('MYSESS2'); session_id('abasdfasdasbafdewra'); session_set_cookie_params( some params); session_start();Description: ------------ The actual version of php is actually 5.6.3 The session does not persist when I set cookie for the session id to last not until the browser is closed. example, to last for a day. When the session id is set to last until the browser is closed, the session start works on subsequent page request. Tested on 3 browsers - chrome, mozilla, and IE. This only happens on IE. realized this problem after upgrading from php 5.4+ I used the session_name function to change the default, so I am not using PHPSESSID. Not sure what is the actual cause. Test script: --------------- session_name('sessionID'); setcookie('sessionID',$sessionID,time()+3600*24,'/',NULL,true);