• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
After session->sess_destroy() redirect to another site and session persist.

#1
[eluser]frankabel[/eluser]
Hi all,

I call:

Code:
$this->session->sess_destroy()


in one of my controller, then I call:

Code:
redirect('otherdomain.com');

So far so good, but when I put in my browser the URL of my site again, I can see that session is not distroyed.

What is wrong here?

Thanks in advanced
Frank

#2
[eluser]ojcarga[/eluser]
Hi,

What you must know is that even if you call sess_destroy() this info will persists in session:

Array
(
[session_id] => 0fe1946fc263b674f995g7s07b5510se
[ip_address] => xxx.xxx.xxx.xxx
[user_agent] => Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1
[last_activity] => 3125649874
[user_data] =>
)

so, if that is the problem, it is not a problem at all. Smile

#3
[eluser]frankabel[/eluser]
Thanks for your help.

#4
[eluser]PhilTem[/eluser]
It's always best to do both, destroying the old session and starting a new one. Try this to get a clean, new session:

Code:
$this->session->sess_destroy();
$this->session->sess_create();


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.