Bug #12177 Updated: session_set_cookie_params broken
| From: | yohgaki@php.net | Date: | Thu, 20 Dec 2001 03:13:08 +0000 |
| Subject: | Bug #12177 Updated: session_set_cookie_params broken | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-74492@lists.php.net to get a copy of this message | ||
ID: 12177
Updated by: yohgaki
Reported By: nick@macaw.demon.co.uk
Old Status: Open
Status: Feedback
Bug Type: Session related
Operating System:
PHP Version: 4.0.6
New Comment:
Please test with 4.1.0 and latest CVS snapshot.
CVS snapshot can be found
http://snaps.php.net/
If you don't have problem with latest CVS snapshot,
you can close your bug report by yourself.
Please report the result. When you update your bug
report, do not forget updating PHP version also.
Thank you
--
Yasuo
Previous Comments:
------------------------------------------------------------------------
[2001-07-15 10:48:47] nick@macaw.demon.co.uk
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
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=12177&edit=1