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

[eluser]Nial[/eluser]
I noticed these two settings in config.php:
Code:
$config['sess_match_ip']        = FALSE;
$config['sess_match_useragent']    = TRUE;

I have set my sessions to never expire, and don't require users to login. Obviously, this is not standard practice, but it's perfect for my situation. Now, my question: is it work setting sess_match_ip to TRUE? I take it this means that session with the same IP will share database rows?

Is matching the useragent better, in this case?
#2

[eluser]Seppo[/eluser]
Session with same IP should not share database rows.
When you set either to true, CI will match the previous data with the current one, so if you have an IP now, and try to use the same session later from other IP (lets say you are using a notebook and you connect at your work and then in your home) it will fail matching the IP and then a new session will be created.
User agent does the same thing... just matches it to check you are the same guy that was using the session before and it is not a session hijacking.




Theme © iAndrew 2016 - Forum software by © MyBB