Welcome Guest, Not a member yet? Register   Sign In
SOLVED - session data available outside of CI ??? - example, for CKFinder (FCKeditor plugin)
#4

[eluser]Flemming[/eluser]
OK here's what I had to do - perhaps it'll save others a little time!

It seems that by default it is not possible to use any 'native' PHP sessions in CI ... eg. not possible to set a session with
Code:
$_SESSION['session_name']= "value"
and then access that either inside OR outside of your CI application.

I downloaded the Native Session Library available here:

http://codeigniter.com/wiki/Native_session/

look right at the end of the post for the v1.5x version which is basically just a single file to put into system->application->libraries. Once you've put that file in you can load the library in your controllers in the normal way ($this->load->library('session');

You can still use the CI methods (eg. session->set_userdata() ) AND you can use native PHP sessions too!

Now I can set session data INSIDE my CI application (eg. a login controller) and access the session data OUTSIDE of CI, through $_SESSION[] !

I know there is a tutorial on the wiki about this but hey, maybe this is useful to others and can save you a bit of frustration.


Messages In This Thread
SOLVED - session data available outside of CI ??? - example, for CKFinder (FCKeditor plugin) - by El Forum - 06-05-2008, 09:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB