Welcome Guest, Not a member yet? Register   Sign In
Session conflict?
#1

[eluser]freshface[/eluser]
Hey,

For my backend and frontend I need to use sessions to know when a user is logged in or not.

For both front and backend I use this config

Code:
$config['sess_cookie_name']        = 'ci_session';
$config['sess_expiration']        = 7200 * 12;
$config['sess_encrypt_cookie']    = FALSE;
$config['sess_use_database']    = TRue;
$config['sess_table_name']        = 'ci_sessions';
$config['sess_match_ip']        = FALSE;
$config['sess_match_useragent']    = FALSE;
$config['sess_time_to_update']     = 300;

When I change from back to frontend (an the otherway around) I am always logged out.
Do i need to use different tables?

Regards.

Frederik
#2

[eluser]TheFuzzy0ne[/eluser]
Are backend and frontend at different subdomains?
#3

[eluser]freshface[/eluser]
domain.com/front and domain.com/front/backend
#4

[eluser]TheFuzzy0ne[/eluser]
Without being able to see how both are implemented, it's hard to say what the problem is, but so long as they are using the same application directory, they should both be able to share the same session table in the database.

I can only conclude that your back end is doing something it shouldn't be. Perhaps it's running the logout procedure, or forcing a new session to be started instead of using the existing cookie?
#5

[eluser]freshface[/eluser]
It seems that its overwrites the session of the frontend. (Don know why or how)

For the frontend I use a session with the name 'cart' and for the backend 'user_id'.
Only the backend uses the auth. lib.
#6

[eluser]TheFuzzy0ne[/eluser]
[quote author="freshface" date="1239056892"]It seems that its overwrites the session of the frontend. (Don know why or how)[/quote]

You're the one in the position to debug the script, not me. Smile
#7

[eluser]freshface[/eluser]
I know Smile
I use unique session names, maybe it was a bug in CI.

I will debug it this evening.




Theme © iAndrew 2016 - Forum software by © MyBB