This tutorial shows how to resolve the Magento admin panel login issue.

It’s a common issue: you are trying to login to the Magento admin panel, typed your username and password, clicked Login button and nothing happens. The page refreshes and that’s all. No error or any other messages.

This is caused by the cookies issue. In some cases Magento can’t store them. Let’s see how the issue can be resolved.

Using localhost (WAMP, XAMP, AppServ etc)

If you are running Magento on local server using the specific server applications (listed above) try to replace ‘localhost’ in the website URL with ‘127.0.0.1’. In other words link to the Magento admin panel login page will be ‘127.0.0.1/magento/admin’

If this doesn’t help please proceed to other solutions

Edit Varien.php file

Open Magento installation directory and go to the ‘app\code\core\Mage\Core\Model\Session\Abstract’ folder. There open ‘Varien.php’ file with your editor (Adobe Dreamweaver, Notepad ++ etc).

Depending on your version of Magento the code can be different so I’ll show you several cases.

Magento 1.4.x

In the Varien.php file locate the code:

if (!$cookieParams['httponly']) {unset($cookieParams['httponly']);if (!$cookieParams['secure']) {unset($cookieParams['secure']);if (!$cookieParams['domain']) {unset($cookieParams['domain']);}}}if (isset($cookieParams['domain'])) {$cookieParams['domain'] = $cookie->getDomain();}

And comment it. Type /* before the code and */ after. Or just replace it with the code below:

/*if (!$cookieParams['httponly']) {unset($cookieParams['httponly']);if (!$cookieParams['secure']) {unset($cookieParams['secure']);if (!$cookieParams['domain']) {unset($cookieParams['domain']);}}}if (isset($cookieParams['domain'])) {$cookieParams['domain'] = $cookie->getDomain();}*/

Magento 1.5.x and Magento 1.6.x

In the Varien.php file locate the code:

$cookieParams = array(            'lifetime' => $cookie->getLifetime(),            'path'     => $cookie->getPath(),            'domain'   => $cookie->getConfigDomain(),            'secure'   => $cookie->isSecure(),            'httponly' => $cookie->getHttponly()
);

and replace with

$cookieParams = array(            'lifetime' => $cookie->getLifetime(),            'path'     => $cookie->getPath(),            //'domain'   => $cookie->getConfigDomain(),            //'secure'   => $cookie->isSecure(),            //'httponly' => $cookie->getHttponly()
);

Then comment the code:

if (!$cookieParams['httponly']) {unset($cookieParams['httponly']);if (!$cookieParams['secure']) {unset($cookieParams['secure']);if (!$cookieParams['domain']) {unset($cookieParams['domain']);}}}if (isset($cookieParams['domain'])) {$cookieParams['domain'] = $cookie->getDomain();}

the same way as for the Magento 1.4.x (please check above)

Magento. Can't login to admin panel, 5.0 out of 51 based on 2 ratings

原文:http://www.templatemonster.com/help/magento-cant-login-to-admin-panel.html

转自: Magento: 无法登录后台 Can't login to admin panel

Magento: 无法登录后台 Can't login to admin panel相关推荐

  1. magento 1.9 用户无法登录 magento 1.9 customer can not login

    Looks like an issue with form-key Go to app/design/frontend/[Your-package]/[Your-theme]/template/cus ...

  2. php keep user login,php5.4安装dedecms登录后台空白解决办法(session_register函数已废弃)...

    本地安装dedecms5.7登录后台空白,找了原因,原来是session_register函数已经被php5.4废弃的原因. ------------------------------------- ...

  3. Magento入门基础 - 后台如何批量导入产品及产品图片

    1.登录后台----system---Inport/Export 先选择 export,也就是先导出一个CSV格式的批量上传文件. 如果网站里没有产品,需要先添加一个产品后才能导出一个批量上传用的CS ...

  4. WordPress查看上次用户何时登录插件When Last Login

    如果你的 WordPress 站点是多人联合管理和开放用户注册功能的大型博客网站,那么想要查看上次用户何时登录您的 WordPress 网站,建议安装这款轻巧 When Last Login 插件.该 ...

  5. SpringBoot日记本系统全程直播03:把登录后台接起来撒~~

    上一节:SpringBoot日记本系统全程直播02:登录页面搞起来撒~~ 大家好,我是今天晚上的主讲老师,我是兔哥. 上一讲,我们学习了登录和注册页面,以及Controller访问页面的方法,还有如何 ...

  6. Django框架项目——BBS项目介绍、表设计、表创建同步、注册、登录功能、登录功能、首页搭建、admin、头像、图片防盗、个人站点、侧边栏筛选、文章的详情页、点赞点踩、评论、后台管理、添加文章、头像

    文章目录 1 BBS项目介绍.表设计 项目开发流程 表设计 2 表创建同步.注册.登录功能 数据库表创建及同步 注册功能 登陆功能 3 登录功能.首页搭建.admin.头像.图片防盗.个人站点.侧边栏 ...

  7. dede 后台 mysql_织梦dedecms使用Mysql8.0无法登录后台的解决办法

    1 //只允许用户名和密码用0-9,a-z,A-Z,'@','_','.','-'这些字符 2 $this->userName = preg_replace("/[^0-9a-zA-Z ...

  8. 在用户控件中用户登录后台脚本判断

    在用户控件中用户登录后台脚本判断写法  if (!IsPostBack)         {                         imagelogin.Attributes.Add(&qu ...

  9. Discuz! X3.2新增管理员无法登录后台的解决办法

    老网站在换空间的时候,遇到了以前的管理员,也是创始人,无法登录的情况,具体现象如下: 网站以前有个老的管理员号前台登录没问题,可是在后台登录时,输入帐号密码,确定后,,用户名和密码两个文本框置空,不能 ...

最新文章

  1. java基础(四) java运算顺序的深入解析
  2. 阿里云总裁胡晓明:保护客户数据隐私是阿里云第一原则
  3. java通过spring获取配置文件_springboot获取properties文件的配置内容(转载)
  4. 【转】2.1.1 购买阿里云服务器(Ubuntu系统)
  5. 【HTML5】Server-Sent服务器发送事件
  6. 为普及再助一把力!《2021年中国低代码/无代码市场研究报告》正式发布
  7. matlab卷积画图,基于MATLAB的卷积演示系统课程设计
  8. 【SoftwareTestingHomework2】--3013218086--
  9. mysql实用教程的数据构造
  10. gamit批量下载精密星历shell脚本
  11. 这个小众副业,一次200,有人月入3万!
  12. 新装Kubuntu 18.04后的一些操作
  13. restTemplate访问接口
  14. AutoCAD二次开发规则重定义
  15. android中出现javax.net.ssl.SSLPeerUnverifiedException
  16. 基于SSM社区网格化小区管理系统设计
  17. 双线性插值与三线性插值
  18. 内蒙古大学计算机考研复试分数线,内蒙古大学2016年考研复试分数线
  19. GD32F20x官方以太网例程勘误
  20. 车窗内观春运 镜头记录旅客百态心情

热门文章

  1. String Problem(HDU-3374)
  2. 一只小蜜蜂(HDU-2044)
  3. 计算浮点数相除的余(信息学奥赛一本通-T1029)
  4. 信息学奥赛一本通C++语言——1014:与圆相关的计算
  5. 36 CO配置-控制-产品成本控制-成本对象控制-期末结算-定义目标成本版本
  6. 科研诚信与学术规范_大学教授学术造假,违背科研诚信
  7. 一起学习C语言:C语言基本语法(三)
  8. linux切换到管理员失败解决方法(因为误操作导致不能切换到管理员用户)
  9. linux 关于虚拟内存的几个系统调用
  10. [实验流体力学][Matlab] 船模阻力实验