zoukankan      html  css  js  c++  java
  • 解决magento后台无法登陆/登陆没有反应的方法

    安装过magento的几个版本,安装好后在登陆后台的时候都遇到了点问题,用户名和密码都输入正确,就是登陆不了后台,经过研究发现,登陆不了后台的主要是因为magento自身缓存设置的问题,最模板解决方法如下:

     
    magento登陆不了后台可以尝试以下几种方法解决:
     
    方法一,用FF登陆后台,在 System—Configuration-Web-Session Cookie management….timeout 改为:86400
     
    如果方法一不行,就用方法二
     
    方法二:仍不能登陆请打开文件 app/code/core/Mage/Core/Model/Session/Abstract/Varien.php
     
    找到代码:
     
    session_set_cookie_params( 
     
    $this->getCookie()->getLifetime(), 
     
    $this->getCookie()->getPath(), 
     
    $this->getCookie()->getDomain(), 
     
    $this->getCookie()->isSecure(),
     
    $this->getCookie()->getHttponly()
     
    );
     
    替换为:
     
    session_set_cookie_params(
     
    $this->getCookie()->getLifetime(), 
     
    $this->getCookie()->getPath() ,
     
    //$this->getCookie()->getDomain(), 
     
    //$this->getCookie()->isSecure(), 
     
    //$this->getCookie()->getHttponly() );
     
    这些是在网上找到的,有几个版本的magento这样做过之后问题就解决了,但是还有的这样设置过后仍登陆不了后台,于是在Google里继续找原因,终于在magento论坛里看到如下内容
     
    magento1.4.1安装完后登录不了后台,但是密码和用户名都是正确的,解决方法:
     
    打开 magento/app/code/core/Mage/Core/Model/Session/Abstract/varien.php
     
    找到下面的代码,注释掉$cookieParams['domain'] = $cookie->getDomain();这行,就行了。
     
    if (isset($cookieParams['domain'])) {
     
                $cookieParams['domain'] = $cookie->getDomain();
     
            }
     
    结果如下
     
    if (isset($cookieParams['domain'])) {
     
                //$cookieParams['domain'] = $cookie->getDomain();
     
            }
     
    但是按照这个去做之后,还是出现错误,于是我把下面这段全部注释掉
     
    //if (isset($cookieParams['domain'])) {
     
                //$cookieParams['domain'] = $cookie->getDomain();
     
       //      }
     
    搞定,现在所有版本magento登陆不了后台的问题都解决了。
  • 相关阅读:
    BitAdminCore框架应用篇:(五)核心套件querySuite列的定义
    BitAdminCore框架应用篇:(四)核心套件querySuite按钮功能
    BitAdminCore框架更新日志20180524
    BitAdminCore框架应用篇:(三)核心套件querySuite入门介绍
    BitAdminCore框架更新日志20180523
    5分钟读懂Linux权限管理
    一文详解CentOS6.5搭建DNS服务
    CentOS6.5下搭建FTP服务
    CentOS6.5下搭建文件共享服务(Samba)
    解析Linux中LVM与磁盘配额
  • 原文地址:https://www.cnblogs.com/focai/p/4459523.html
Copyright © 2011-2022 走看看