CodeIgniter Forums
Trying to wrap up my session / cookie issues - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Trying to wrap up my session / cookie issues (/thread-13297.html)



Trying to wrap up my session / cookie issues - El Forum - 11-17-2008

[eluser]internut[/eluser]
Hey All,

Things have been going great with CI but now I'm back to working with sessions
and getting hung up.

I love the CI library for sessions. My only issue is its not letting me grab
a $_SESSION[name] var outside the CI application.

I have been working with the wiki session library by: Dariusz Debowczyk

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

Which allows me to grab $_SESSION vars in an individual .php file around a site.

Though this wiki library does not seem to be taking the session config settings of:

$config['sess_expiration'] = 15;
$config['sess_time_to_update'] = 3;

Its just keeping the session data active and never expiring. So with the above if
i come back 20 seconds later i'm still logged in.

CI's normal/default library would send me back to a login screen.

Thoughts on using CI's default session library and getting the $_SESSION vars
available to another .php script away from this CI app?


Trying to wrap up my session / cookie issues - El Forum - 11-17-2008

[eluser]internut[/eluser]
I guess the native way is going off php.ini's settings. So if i go that route I lose the re-generating options.

I'd love to use CI's version.... Goda be some way I can set some PHP native session vars.

Actually i could just set some cookies and call vars that way in an outside page.

Cant only like 20 cookies per site be set?


Trying to wrap up my session / cookie issues - El Forum - 11-17-2008

[eluser]internut[/eluser]
Guess I have it figured out. Will use the wiki library and have it use native sessions. I'll have an admin setting to have the admin user set the cookie expiration time the same and a warning to set it the same as the session expiration setting / time / seconds in php.ini.