• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Codeigniter sessions not working CI v 3.1.7 in chrome mobile android

#1
I recently discovered that my website login that uses CI v 3.1.7 and Ion Auth, doesn't work on my Android version of Chrome. It  works in my Android Firefox and in Chrome/Firefox/Edge desktop. I cannot for the life of me figure out what the difference could be. 
  • I cleared all of my browser data in mobile, still the issue persists.
  • I deleted all my session files, still nothing.
  • I renamed my sess_cookie_name
  • I made a new sessions dir
  • Session recheck timer in ion_auth is OFF (always has been)
Here is my config:


Code:
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'fagardesigns_session';
$config['sess_expiration'] = 86400;
$config['sess_save_path'] = dirname(ROOT) . DS . '_sessions_' . DS;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;


$config['cookie_prefix'] = 'nc';
$config['cookie_domain'] = '.fagardesigns.com';
$config['cookie_path'] = '/';
$config['cookie_secure'] = FALSE;
$config['cookie_httponly'] = FALSE;

Using chrome dev tools and my mobile device hooked up to my laptop I was able to get the session variables as expected only on success of the ajax request (using `print_r` and network response tab of dev tools). If I then went to any other page and tried `print_r`ing the session vars they no longer existed. The session cookie `fagardesigns_session` did not change between page reloads thus CI should be pulling the session vars just fine... It is almost like they were never written.

I ran a separate test on a controller like:
Code:
class Test extends MY_Backend {
   
   public function __construct() {
       parent::__construct();
   }

   public function index() {
       //$this->load->library('session');
       $this->session->set_userdata('info1', 'someinfo1');
       $_SESSION['info2'] = 'someinfo2';
   }

   public function test() {
       echo '<pre>';
       print_r($_SESSION);
   }

}

and was able to get the session variables correctly after visiting `test/index` and then visting `test/index/test`.

What could possibly be the issue? Obviously this question is very broad, but perhaps someone has either come across this issue before, or knows some troubleshooting steps I could take that I haven't thought of.


UPDATE:

As a last resort I uploaded my entire site to 000.webhost (free webhost) and tried it out. Same version of PHP, same everything except a different base_url and database connection (obviously). And it worked on my chrome mobile. Still have no clue... beginning to think there is a cookie or something in my phone that just won't delete despite me clearing Chrome's everything.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


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