Welcome Guest, Not a member yet? Register   Sign In
Session + Cookie problems. Not working as advertised!
#1

[eluser]dallen33[/eluser]
My setup is IIS7, PHP Version 5.3.2.

I have a form with a checkbox that says "Remember Me" so if a user clicks it, the info they entered is saved so the next time they visit, the form gets re-populated. This works. A cookie is created and a row in ci_sessions is created with all the pertinent info.

Here are my session & cookie settings:

Code:
$config['sess_cookie_name']        = 'je';
$config['sess_expiration']        = 0;
$config['sess_encrypt_cookie']    = TRUE;
$config['sess_use_database']    = TRUE;
$config['sess_table_name']        = 'ci_sessions';
$config['sess_match_ip']        = TRUE;
$config['sess_match_useragent']    = TRUE;
$config['sess_time_to_update']     = 300;

$config['cookie_prefix']    = "";
$config['cookie_domain']    = "xxx.xx.xx.xx"; // I'm hiding the IP I use, but it's there
$config['cookie_path']        = "/";

The problem is, if I quit my browser (Safari 4.0.5 on a PPC Mac) and re-open the webpage, it will SOMETIMES start a new session without deleting the old one. I definitely don't want that happening. I set sess_expiration to 0 so the session never expires. I want a user to be able to click that Remember Me button without having to re-enter their info.

Why would it be doing this? Is there something wrong with my config?
#2

[eluser]Stu Green[/eluser]
I get issues like this too sometimes. In Safari, even though I'm destroying the session and the cookie (using CodeIgniters functions to do so), I can sometimes go back to the page and it will pick up the old session data.




Theme © iAndrew 2016 - Forum software by © MyBB