设置 magento 前端的会话超时限制
我试图在 magento 中将会话超时限制设置为 30 分钟,但它不会在 30 分钟内过期。我进入系统->配置->Web->会话 Cookie 管理并为字段Cookie 生命周期
设置 1800 值,但会话仍然没有过期在指定的超时限制内。我不知道 Magento 前端会话有什么问题。
我是否将限制设置在正确的位置? magento 后端是否有其他设置来设置前端会话超时限制。
I am trying to set session time out limit to 30 minutes in magento but it is not expiring in 30 minutes. I went to System->Configuration->Web->Session Cookie management and set 1800 value for the field Cookie Life time
but still it is not expiring the session in specified time out limit. I don't know what is wrong with Magento frontend session.
Am I setting the limit at right place?
Is there any other setting in magento backend to set the frontend session time out limit.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这也可以通过管理面板来实现,而无需触及任何一行代码。
转到系统->配置->高级->管理->安全并将会话生命周期设置为您希望的秒数。我总是在我的开发环境中将其设置为一天(86400 秒)。
系统->配置->网络->会话 Cookie 管理用于为普通用户设置超时,登录他们的个人资料和不是管理面板。
This can also be achieved from the admin panel without touching a single line of code.
Go to System->Configuration->Advanced->Admin->Security and set the session lifetime to how many seconds you wish. I always set it to one day (86400 seconds) on my development environment.
System->Configuration->Web->Session Cookie management is for setting the timeout for normal users, signing into their profile & not the admin panel.
我在 Magento 管理会话中遇到了这个问题。问题的关键在于 Magento 的 cookie 遵循 PHP 的
session.gc_maxlifetime
参数。如果您在 htaccess 中进行如下调整,您应该会有更好的运气:希望有帮助!
谢谢,
乔
I had this issue with the Magento admin session . The crux of the problem is that Magento's cookies obey PHP's
session.gc_maxlifetime
parameter. If you adjust that in your htaccess like the following, you should have better luck:Hope that helps!
Thanks,
Joe
我发现我错过了什么。
我正在为默认配置设置 cookie 生命周期,但它不起作用。
但这还需要在网站和商店配置范围中设置超时时间。
设置这些范围的时间后,它就起作用了。
I found out what I was missing.
I was setting the cookie life time for default configuration but it did not work.
But this also needs to set the time out in website and store configuration scope.
After setting the time for these scopes it worked.