Welcome Guest, Not a member yet? Register   Sign In
CI sessions, avoid sessions created by non-humans
#1

[eluser]moot[/eluser]
Hi,

the CI default session library creates an session once it’s been loaded. I think this can be problematic if for example bots query a page, it would fill the database (I use CI session with a DB) with entries nobody needs.

What’s the best solution to this problem?

So far I have done the following (login area):

Check if the CI cookie exists,
if so, load CI session library.

Or, if the user just logs on, validate the user name and
password, if correct, load the CI session library.
#2

[eluser]moot[/eluser]
Another question:

When do expired sessions get deleted from the database?

Does the CI session library look for and erase expired sessions every time it gets initialized?

Thanks




Theme © iAndrew 2016 - Forum software by © MyBB