Welcome Guest, Not a member yet? Register   Sign In
Question about Sessions ...
#3

Hi, ozzy. Welcome to Codeigniter and its forums.

Just to clarify, there's no actual session helper. There is a session class, and all you have to do to use it is autoload it or declare it in your class constructor like this:
PHP Code:
$this->load->library('session'); 

The Codeigniter sessions don't use the PHP sessions, so you don't have to do any session_start() like you do in PHP. Merely loading the library is enough.

In response to your question, no, Codeigniter does not automatically reinitialize sessions when it instantiates a new controller. It first checks to see if the existing session has expired. Open the file config.php in your application/config folder and look for 'sess_expiration.' It comes set by default to 7200 seconds, which is two hours.

I don't know if or how this would affect things, but check also for 'encryption_key.' The manual says you must set it, and you can set it to whatever string you want.

Aside from that, I don't know what else it could be. Huh
Reply


Messages In This Thread
Question about Sessions ... - by ozzy mandiaz - 11-11-2014, 03:09 PM
RE: Question about Sessions ... - by benedmunds - 11-11-2014, 05:57 PM
RE: Question about Sessions ... - by ella - 11-11-2014, 07:05 PM
RE: Question about Sessions ... - by RobertSF - 11-12-2014, 07:38 PM
RE: Question about Sessions ... - by RobertSF - 11-11-2014, 06:26 PM
RE: Question about Sessions ... - by kilishan - 11-11-2014, 07:28 PM
RE: Question about Sessions ... - by RobertSF - 11-11-2014, 07:47 PM
RE: Question about Sessions ... - by ozzy mandiaz - 11-12-2014, 06:47 PM
RE: Question about Sessions ... - by ozzy mandiaz - 11-12-2014, 09:22 PM
RE: Question about Sessions ... - by InsiteFX - 11-12-2014, 09:39 PM
RE: Question about Sessions ... - by ozzy mandiaz - 11-12-2014, 10:04 PM



Theme © iAndrew 2016 - Forum software by © MyBB