[eluser]GPSTrackit[/eluser]
I am using version 1.7.2 and I am having the same problem but the fix recommended is NOT working.
When a user logs in they see a simple page. My logout function looks like this:
Code:
function logout()
{
$this->session->sess_destroy();
$this->session->sess_create();
$this->session->set_flashdata(array('message' => array('type' => 'success', 'content' => 'You have successfully logged out.')));
redirect("/");
}
When the user is redirect, the flashdata is gone and I am getting an error trying to display it. If I comment out just the sess_destroy or just the sess_create I still get an error and lose the flashdata. If I comment out both I get the flashdata but the session is not gone. I also tried adding $this->session->unset_userdata('variablename'); and still leave the destroy and create lines commented out and it kills my flashdata. The unset is unsetting a COMPLETELY unrelated value. Why is unset_userdata KILLING my flashdata?
It seems that CI really introduced a MAJOR bug in session handling. It might be important to note that I am using cookies and not the db option. I will try that next, but I'd like to stay away from the database. I am not fond of cookies either but it doesn't appear that there is a *reliable* native PHP session handler for CI, sadly.
Thank you to those that have some solutions to offer. Haters need not reply.