Welcome Guest, Not a member yet? Register   Sign In
How to make 2 different session in one codeigniter ?
#1

[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
#2

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

[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 ?

#4

[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';
#5

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




Theme © iAndrew 2016 - Forum software by © MyBB