session_regenerate_id(true) not work
Posted
by
user995789
on Stack Overflow
See other posts from Stack Overflow
or by user995789
Published on 2012-10-09T09:34:04Z
Indexed on
2012/10/09
9:36 UTC
Read the original article
Hit count: 150
php
I use wampserver2.1 php5.3.3, I found session_regenerate_id(true) not work in my script,document says when I set the parameter 'delete_old_sessions' true, there should be a new sid and all the session variables should be deleted, but the fact is after the function, $_session[abc] is still there. did I misunderstand the function,what is my problem? I appreciate if anyone can help me,
<?php
session_start();
$_SESSION['abc']=12323;
session_regenerate_id(true);
echo $_SESSION['abc'];
?>
I thought it should display none, but it outputs:12323
© Stack Overflow or respective owner