CI SESSION DATA DOES NOT ACCEPT SOME BROWSER ON SOME COMPUTER

Ankit Singh

Total Post:341

Points:2389
Posted by  Ankit Singh
 779  View(s)
Ratings:
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.
  1. Chintoo Semi

    Post:135

    Points:947
    Re: Ci Session data does not accept some browser on some computer

    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.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!