phpcodeignitersessiontankauth

What is the use of setting sess_use_database to TRUE in codeigniter tank auth?


$config['sess_use_database']    = TRUE;

I have came across this in tank auth.Is it neccessary to save session data in database.Im new to this.Can some one tell me why? and what if , if I set it to FALSE.Will it affects the web application?


Solution

  • The Session class stores session information for each user as serialized (and optionally encrypted) data in a cookie.

    Cookie has a limit of 4k.

    By setting $config['sess_use_database'] = TRUE; you allow codeigniter to save "cookies" in database so data can be as big as application needs.

    You keep asking if it will affect website... If you didn't create application yourself do not change it.

    If you know that data in session is going to be bigger than 4k enable it otherwise don't bother with this setting.