CI 3.0 is losing Session always - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: CI 3.0 is losing Session always (/showthread.php?tid=1339) |
CI 3.0 is losing Session always - NinoSPFC - 03-01-2015 Hello, I have started a web site with CI 3.0, but I am with a problem with storing session. I create the session example: PHP Code: $newdata = array( But in refresh, every sessions has removed. My config: PHP Code: $config['sess_driver'] = 'database'; My autoload PHP Code: $autoload['libraries'] = array('database', 'session'); RE: CI 3.0 is losing Session always - spjonez - 03-01-2015 You should remove session from the drivers autoload since it's a library. When you say it's removed, do you mean it's not in the DB or when you try to use $this->session->userdata( 'username' ) you don't get the expected value? RE: CI 3.0 is losing Session always - NinoSPFC - 03-01-2015 I removed the autoloaders. But in a example, controller Login I create de session, and still I can't show the session using: $this->session->userdata( 'username' ) RE: CI 3.0 is losing Session always - twpmarketing - 03-01-2015 Did you create the table: "ci_session" in your database? Depending on your DB drive, the file structure is different. Lots of information in the 3.0 User Guide: file:///home/twp/Dev/CI3.0/user_guide/libraries/sessions.html#database-driver Check that your app configuration meets the three conditions stated at the top of section on the database session driver. Second paragraph: Quote: RE: CI 3.0 is losing Session always - NinoSPFC - 03-01-2015 Yes, i created the table and it is works! That's ok now, was a problem with logout() in a librarie. Thanks |