Home > DeveloperSection > Forums > Ci Session data does not accept some browser on some computer
Ankit Singh

Total Post:341

Posted on    October-31-2014 11:30 PM

 ASP.Net Session 

 1 Reply(s)
 727  View(s)
Rate this:
I use CI for my website. And I have a login page. But in some browsers on some computers I can't login to the system, because no userdata is stored in browser. I can't figure out what is the difference between the (PC+Browser)s which can and can't login.

Chintoo Semi

Total Post:135

Posted on    October-31-2014 11:33 PM

If you are using database for storing your CI sessions (table ci_sessions), make sure you change the default UserAgent field to VARCHAR 250 or something like that. Right now I think it's something rather small that doesn't accomodate the entire UserAgent. That way, I think the browser isn't identified

A second cause could be that you need to open config/config.php and edit this section

$config['cookie_prefix']    = "prefix";
$config['cookie_domain']    = "localhost";
$config['cookie_path']  = "/";
$config['cookie_secure']    = TRUE;

And change

$config['cookie_domain']    = "YOUR_DOMAIN";

Make sure YOUR_DOMAIN is a valid domain that your website is running on. Do not use IPs or localhost.

Don't want to miss updates? Please click the below button!

Follow MindStick