Siddharth vyas Siddharth vyas - 3 months ago 11
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

$config['sess_use_database']

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

Answer

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 (http://www.codeigniter.com/user_guide/libraries/sessions.html)

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