今天安装了magento,费了不少周折。
针对目前最新版magento v1.5.0.1本地安装magento无法登陆后台的问题,我总结了以下解决方法
打开magento的文件夹
app/code/core/Mage/Core/Model/Session/Abstract/varien.php文件
修改第77-84行代码
源代码:
![332c6459dac3a0722934f02a.jpg](https://i-blog.csdnimg.cn/blog_migrate/3d83f4dc2ac73283c703973a4739b76f.gif)
$cookieParams = array(
'lifetime' => $cookie->getLifetime(),
'path' => $cookie->getPath(),
'domain' => $cookie->getConfigDomain(),
'secure' => $cookie->isSecure(),
'httponly' => $cookie->getHttponly()
);
修改为:
![c12bd02a29db40c3023bf62a.jpg](https://i-blog.csdnimg.cn/blog_migrate/7594180acf68f97416c1d0b020cc73c7.gif)
$cookieParams = array(
'lifetime' => $cookie->getLifetime(),
'path' => $cookie->getPath(),
//'domain' => $cookie->getConfigDomain(),
//'secure' => $cookie->isSecure(),
//'httponly' => $cookie->getHttponly()
);
方法很有效,我已测试通过。