Bug #12177 Updated: session_set_cookie_params broken
| From: | lobbin@php.net | Date: | Wed, 09 Jan 2002 07:03:29 +0000 |
| Subject: | Bug #12177 Updated: session_set_cookie_params broken | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-76309@lists.php.net to get a copy of this message | ||
ID: 12177
Updated by: lobbin
Reported By: nick@macaw.demon.co.uk
Old Status: Feedback
Status: Closed
Bug Type: Session related
PHP Version: 4.0.6
New Comment:
No feedback. Closing.
Previous Comments:
------------------------------------------------------------------------
[2001-12-19 22:13:08] yohgaki@php.net
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
------------------------------------------------------------------------
[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