I’m having trouble with Magento’s frontend session timeout. I want it to be 30 minutes but it’s not working right.
I tried setting it in the admin panel:
- Went to System → Configuration → Web
- Found Session Cookie Management
- Set Cookie Lifetime to 1800 seconds
But the session still doesn’t expire after 30 minutes. What am I doing wrong?
Is there another place I need to change this setting? Or maybe some extra steps I’m missing?
I’m new to Magento and can’t figure out why the frontend session won’t timeout properly. Any help would be great!
Here’s a code snippet I tried (but it didn’t work):
$session = Mage::getSingleton('core/session');
$session->setLifetime(1800);
$session->start();
Does anyone know the correct way to set this up? Thanks!
hmm, that’s a tricky one! have you tried clearing your browser cache after making those changes? sometimes old session data can stick around. also, are you using any custom modules that might be overriding the default session behavior? it might be worth checking your server’s php.ini settings too, just to rule that out. what version of magento are you running?
I’ve encountered similar issues with Magento’s session timeout. One often overlooked aspect is the server-side PHP configuration. Check your php.ini file and ensure the session.gc_maxlifetime value is set to at least 1800 seconds. Additionally, verify that your server’s load balancer or reverse proxy isn’t interfering with session management. If you’re using Redis or Memcached for session storage, their configurations might also need adjustment. Lastly, consider implementing a custom module to forcefully set the session lifetime, as sometimes core settings can be overridden by other extensions or theme-specific configurations.
hey spinninggalaxy, i feel ya! magento can be a pain sometimes. have u checked the app/etc/local.xml file? there’s a <session_save> tag there that might be messin with ur timeout. also, make sure ur using the right scope when changin settings in admin panel. sometimes ppl forget to switch from default to website/store view. hope this helps!