CodeIgniter Forums
How to make 2 different session in one codeigniter ? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: How to make 2 different session in one codeigniter ? (/showthread.php?tid=52376)



How to make 2 different session in one codeigniter ? - El Forum - 06-07-2012

[eluser]Mario "St.Peter" Valentino[/eluser]
hello everybody ,

i have trouble. i have 2 application in 1 codeigniter application : one for administrator & other one for frontend.

when i open both application in same browser. i have problem when i open administrator application first and login i have no problem then i open frontend application and when back to administrator application i have to login again.

is there anybody here can help me to solve this problem ?
and give me code please.



Thanks


Mario


How to make 2 different session in one codeigniter ? - El Forum - 06-07-2012

[eluser]Abel A.[/eluser]
EDIT: misread your post...


How to make 2 different session in one codeigniter ? - El Forum - 06-07-2012

[eluser]Mario "St.Peter" Valentino[/eluser]
i have two folder application in one CI installation
1 for backend
1 for frontend

i open 2 application in same browser
ex: localhost/catalog/ -> this for frontend
localhost/catalog/admin.php -> for backend

first i login to backend then i open frontend in other tab then i open backend again
i wanna ask why i must login again or why session in backend destroy ?

anybody can solve this problem ?




How to make 2 different session in one codeigniter ? - El Forum - 06-08-2012

[eluser]anis2505[/eluser]
As I know you can't do it unless you create two different apps for backend and frontend

CI
++SYSTEM
++APPLICATION
++++FRONTEND
++++BACKEND

and foreach config file set the session name different from the other one

FRONTEND config.php
$config['sess_cookie_name'] = 'frontendsession';

Backend config.php
$config['sess_cookie_name'] = 'backendsession';


How to make 2 different session in one codeigniter ? - El Forum - 06-08-2012

[eluser]Mario "St.Peter" Valentino[/eluser]
should i make different table session for saving diferrent session ?