|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-04-23 16:51 UTC] myselfasunder at gmail dot com
Description:
------------
I have set the following:
session_name('GOLDENCOLLECTION');
session_set_cookie_params(86400 * 3);
ini_set('session.use_only_cookies', '1');
ini_set('session.gc_maxlifetime', 86400 * 3);
I can load the same page many times successfully. However, if I wait a while, around twenty minutes, the session's members are no longer available.
This is the first time I've used cookies to carry the SID (instead of putting them in the URL).
I have administrative control of the system.
Reproduce code:
---------------
session_start();
Expected result:
----------------
The session should be started and all preexisting members should be available. They -does- happen, but until only around twenty or thirty minutes have elapsed, and then they'll be gone.
Actual result:
--------------
They'll disappear without me doing anything.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 13:00:01 2025 UTC |
<?php session_name('COOKIE'); session_set_cookie_params(86400 * 3); ini_set('session.use_only_cookies', '1'); ini_set('session.gc_maxlifetime', 86400 * 3); session_start(); if(isset($_SESSION['aa'])) print("Session already exists.<br>"); else print("Session DOES NOT exist.<br>"); $_SESSION['aa'] = true;I've removed the session name setting and the cookie-parameters call: ini_set('session.use_only_cookies', '1'); ini_set('session.gc_maxlifetime', 86400 * 3); session_start(); if(isset($_SESSION['aa'])) print("Session already exists.<br>"); else print("Session DOES NOT exist.<br>"); $_SESSION['aa'] = true; However, even though the cookie lifetime is 0, the session still disappears. Thoughts/suggestions? Is this most likely a me-problem, or the extension?