[英]Magento: Unable to login both customer and admin, and unable to add to cart
I have tried setting the cookie lifetime to 86400 and configuring other settings from the magento backend but still doesn't work. 我尝试将Cookie的生存期设置为86400,并从magento后端配置其他设置,但仍然无法正常工作。 I tried clearing the cache and somehow solves the problem for a few minutes then it won't work again. 我尝试清除缓存,以某种方式解决了几分钟的问题,然后它不再起作用。 Please help. 请帮忙。
Please do config as below 请做如下配置
go to admin->system->configuration-> Web -> Session Cookie Management 转到admin-> system-> configuration-> Web->会话Cookie管理
Cookie Lifetime : 86400
Cookie Domain : .yoursite.com
Use HTTP only : yes
Cookie Path : /
Or Comment below code 或注释以下代码
Go to: Magento Folder/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php 转到:Magento文件夹/应用程序/代码/核心/法师/核心/模型/会话/摘要/Varien.php
and comment out the following that starts at about line 78 as you see below. 并注释掉以下从第78行开始的内容,如下所示。
/*
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()
$this->getCookie()->getDomain(),
$this->getCookie()->isSecure(),
$this->getCookie()->getHttponly()
);
*/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.