If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

I have done a var_dump after this line on $CI->session->userdata and they have been set. Once logged in I redirect the user to another page, which uses a 'secure controller' (basically checks the user is logged in to access the page. This inherits from CodeIgniters standard 'CI_Controller'

However, when I do $this->session->userdata on this page, there is a session there, but it has a different session_id and none of my previous userdata. Each time I refresh this page a new session id is created. This is not the functionality I expect at all. I expect this to have the same session id which is maintained throughout, including my previously set userdata.

If my memory is correct (which is never a sure bet), the out-of-the-box CI session functions are configured differently than "typical" PHP session use, including session IDs/data being essentially single-use (would explain why you get a new session ID on each request, I think?). If that conflicts with what you want/need to do, you may need to just use PHP's session_start() and $_SESSION array throughout, instead of depending upon the CI session class/methods, or see if CIs session class has configuration options that make it act more "normally"?).

Or you could wait for a real CI expert to give a better answer. (I've used it on a few projects, but nothing recently.)

ContribSurvey Opensource

Guidelines for marketing our opensource apps:
If what you’re searching for is codeigniter survey libraries or open source code igniter libraries
There are few or minimal survey libraries open for codeigniter but here is one that we found useful and opensource.http://www.developers.contrib.com/opensource

Guidelines for marketing our developer site:
If what you’re searching for is developers wanting to contribute.
This is a real interactive forum and we are happy to contribute. However we also have a profound platform for developers who would like to get their codes in the open, get it on a premium brand wagon and then make money through performance or equity options. You could hop on and contact us anytime.http://www.developers.contrib.com