Siddharth vyas Siddharth vyas - 11 months ago 46
PHP Question

How to increase limit of add to cart without using $config['sess_use_database'] in codeignitor

I am using codeignitor in my ecommerce website and using add to cart function, but i can only add four product at a time.
How do i increase a cookie value without using


so i can add more then 4 product at a time.

Answer Source

The problem is probably that you exceeded cookie size limit (CI sessions are stored as cookies).. Most browsers max size is around 4Kb.

Set $config[‘sess_use_database’] = true in your config.php

Don't forget to create the ci_sessions table (

It works for me and I hope it will work for you too.