Recently I got an implementation of a shopping cart that needs a fix.
The shopping cart object is stored in a $_SESSION['cart']. Now there is a problem when the browser is closed, the cart is lost, because sessions do not remain active after the browser is closed.
The way to fix this is to store the cart object in a cookie with longer lifetime instead of a session.
My question to you is if you know a quick fix, or do I really have to go though all the source files and replace the sessions with cookies?
The session is identified by cookie usually and by default that cookie is removed after browser is closed. So if you need to make session which will last long (or forever) you should adjust parameter
session.cookie-lifetimeof PHP engine.Here are the docs on that.