|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-12-19 22:13 UTC] yohgaki@php.net
[2002-01-09 02:03 UTC] lobbin@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 15:00:01 2025 UTC |
This assumes default settings in php.ini Description: the effect of session_set_cookie_params() is documented to last only for the duration of the calling script, however it's affect appears to last globally forever. i.e. After using a session named "SID1" with a cookie timout of 5 seconds, subsequently using a session "SID2" with default cookie parameters will also have a timeout of 5 seconds. The following two scripts will illustate this. <?php session_name("SID1"); session_set_cookie_params(5,"/"); session_start(); echo "Sid is [",session_id(),"]\n"; ?> Loading this, SID1 changes every 5 seconds as expected. Loading the following, however, SID2 also changes every 5 seconds, even though cookie params have *not* been set in this script. <?php session_name("SID2"); session_start(); echo "Sid is [",session_id(),"]\n"; ?> Nick