本地安装magento无法登陆后台的问题

今天安装了magento,费了不少周折。
针对目前最新版magento v1.5.0.1本地安装magento无法登陆后台的问题,我总结了以下解决方法

打开magento的文件夹
app/code/core/Mage/Core/Model/Session/Abstract/varien.php文件

修改第77-84行代码
源代码:

332c6459dac3a0722934f02a.jpg 程序代码        // session cookie params
       $cookieParams = array(
           'lifetime' => $cookie->getLifetime(),
           'path'     => $cookie->getPath(),
           'domain'   => $cookie->getConfigDomain(),
           'secure'   => $cookie->isSecure(),
           'httponly' => $cookie->getHttponly()
       );



修改为:

c12bd02a29db40c3023bf62a.jpg 程序代码        // session cookie params
       $cookieParams = array(
           'lifetime' => $cookie->getLifetime(),
           'path'     => $cookie->getPath(),
           //'domain'   => $cookie->getConfigDomain(),
           //'secure'   => $cookie->isSecure(),
           //'httponly' => $cookie->getHttponly()
       );



方法很有效,我已测试通过。