3

I am using Codeignitor 3 and I am creating a shopping cart which I store in the session. If I clear the session table then load my page, an initial session is created. I can add data to the session, delete date, reload pages, etc and one session will remain but after awhile or a few other actions, I get multiple sessions in my database. The IDs are unique and in some cases the BLOB data is the same or different. Below are my config settings and DB table screenshot. I am working on my local machine and using XAMPP. The first session was there for awhile and the cart functionality was working fine, then new sessions were added, screwing up all the logic.

All 3 session in the screenshot contain the same BLOB data.

There are other post on this topic bu they are for older version of CI and, CI sessions table no longer has the user agent field.

Config

enter image description here

Database

enter image description here

ReeseB
  • 297
  • 1
  • 3
  • 23
  • [This related questions page has a lot of suggestions.](http://stackoverflow.com/questions/2438835/codeignitor-is-generating-multiple-sessions-in-the-database-why?rq=1) – ourmandave Dec 11 '16 at 02:11
  • 1
    The suggested thread is old and referring to an older version of CI, the session table has changed in CI 3. – ReeseB Dec 11 '16 at 16:56

1 Answers1

-1

Issue resolved.

$config['sess_regenerate_destroy'] = TRUE;

ReeseB
  • 297
  • 1
  • 3
  • 23