英文:
I'm using Magento 2.4.6 and want to allow customers to log in permanently as long as I don't hit the logout button
问题
我正在尝试在Magento 2.4.6中实现客户登录时长为2天或(一段时间)。我尝试调整“在线会话生命周期”值以控制Magento 2.4.6中客户会话的持续时间,但它没有起作用!
如您在图像中所见,我尝试更改默认值,但没有起作用:
英文:
I am trying to achieve a login duration of 2 days or (a period of time) for customers in Magento 2.4.6. I tried adjusting the "Online Session Lifetime" value to control the duration of customer sessions in Magento 2.4.6 but it's not working!
as you can see in the image i tried to change the default value but it didn't work :
答案1
得分: 1
一种实现这个的方法是检查并可能调整 php.ini 配置文件。
这里有两个设置:
-
'session.gc_maxlifetime' 这个设置表示会话的最大生存期(以秒为单位)。
-
'session.cookie_lifetime' 这个设置确定会话 cookie 的生存期(以秒为单位)。如果将值设置为 0,那么 cookie 将在浏览器关闭时过期。
英文:
One way to achieve this is by checking and potentially adjusting the php.ini configuration file.
There are two settings in here:
-
'session.gc_maxlifetime' This setting represents the maximum lifetime of a session in seconds.
-
'session.cookie_lifetime' This setting determines the lifetime of the session cookie in seconds. If the value is set to 0 the cookie will expire when the browser is closed.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论