Understanding PHP Sessions in Magento -


im having trouble figuring out couple things regarding sessions, browser, , magento (or shopping cart matter). understand default 24 minutes of inactivity close session. under the understanding when exit browser, session closed.

to test second part accessed magento store, added product cart, , exited browser. reopened browser , product still in cart. how so? php garbage collector run @ times? figured session dead therefore couldnt link cookie stored on machine. appreciated.

native php sessions use cookie 0 expiry, cleared upon browser window being closed. magento's session cookie (as emi noted) has 3 hour expiry , persist between browser sessions, closing/opening browser window won't cause session restarted. firefox web developer toolbar, or chrome's developer tools allow forcibly clear cookie , restart session if that's want do.

i should note although cookie name different , has expiry time, under hood magento use php's native session support. means settings in php.ini relating max session lifetime, etc affect magento's sessions.

also, since magneto 1.6 (and ee 1.11) there's feature called persistent shopping cart establishes long term cookie purpose of maintaining shopping cart between sessions. if test see whether session maintained looking @ cart feature may making session longer is..


Comments