Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide CodeIgniter ci_session display on browser client (firebug)?

I just notice that CodeIgniter store session as Cookies, the problem final user could see easily our array session even encrypt $config['sess_encrypt_cookie'] = TRUE;, i feel not safe. I want like raw php $_session it is not display on client side browser.

like image 401
Meas Avatar asked Sep 02 '26 04:09

Meas


1 Answers

The solution is to not save session data client side. In application/config/config.php, set $config['sess_use_database'] to TRUE. This will save all session data in a database.

You will need to make sure you enter your DB connection settings into CI, and make sure the table ci_sessions exists in your database.

CI User Guide - Sessions Class

like image 115
xbonez Avatar answered Sep 03 '26 19:09

xbonez