Native Session makes good use of PHP’s native session handling abilities, but it does not allow the use of a database for session storage. KNDB Session (which stands for Kirilisa’s Native Database session) is a hybrid which is based upon Native Session (with some notable changes) but allows use of databases via PHP’s ability to store sessions in a DB.
Differences between KNDB Session and Native Session
- Allows use of a database for session storage
- Keeps track of both sess_expiration and sess_time_to_update (in config) and thus distinguishes between session id needing regeneration and the session actually expiring (Native session considered sess_expiration as the time needed to regenerate a session id and never expires the session)
- Added method all_userdata() to get all session data: this method is in CI’s bundled session library but missing from Native Session
- Allows you to access values from single-dimensional arrays & objects stored in the session
- Made some changes to regenerate_id() method to shorten code and a fix potential bug there