Login   Register  
PHP Classes
elePHPant
Icontem

Warning: session_regenerate_id

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      Secure Session  >  All threads  >  Warning: session_regenerate_id  >  (Un) Subscribe thread alerts  
Subject:Warning: session_regenerate_id
Summary:Session object destruction failed
Messages:3
Author:pecili
Date:2013-02-11 09:46:13
Update:2013-02-12 20:24:14
 

  1. Warning: session_regenerate_id   Reply   Report abuse  
Picture of pecili
pecili
2013-02-11 09:46:13
Hello,

I get this error message:


Warning: session_regenerate_id() [&lt;a href='function.session-regenerate-id'&gt;function.session-regenerate-id&lt;/a&gt;]: Session object destruction failed in classes\securesession.class.php on line <i>62</i>

  2. Re: Warning: session_regenerate_id   Reply   Report abuse  
Picture of Vagharshak Tozalakyan
Vagharshak Tozalakyan
2013-02-11 15:24:53 - In reply to message 1 from pecili
Hello, If you are destroying a cookie-enabled session, make sure your page is reloaded, because a new cookie is being sent when regenerating session_id.

session_start();
session_regenerate_id();
header('Location: script.php?destroy=1');

And on reload:

if (isset($_GET['destroy'])) {
session_start();
session_destroy();
}

Hole that helps.

  3. Re: Warning: session_regenerate_id   Reply   Report abuse  
Picture of pecili
pecili
2013-02-12 20:24:14 - In reply to message 2 from Vagharshak Tozalakyan
All is ok... Thank you for your help.