您的位置:首页 > 大数据 > 人工智能

magento本地安装后台无法登陆

2011-07-18 22:43 267 查看
magento安装在本地之后无法登陆
解决方法:1.安装时直接用127.0.0.1做为访问地址,就可以登陆,如果用localhost的话,要打开magento的文件夹app/code/core/Mage/Core/Model/Session/Abstract/varien.php文件

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

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

修改为:

程序代码        // session cookie params
        $cookieParams = array(
            'lifetime' => $cookie->getLifetime(),
            'path'     => $cookie->getPath(),
            //'domain'   => $cookie->getConfigDomain(),
            //'secure'   => $cookie->isSecure(),
            //'httponly' => $cookie->getHttponly()
        );
注释掉三个条件
 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  magento session domain path