Magento 无法使用正确的用户名和密码登录管理员 [英] Magento can't login in admin with right username and password

查看:35
本文介绍了Magento 无法使用正确的用户名和密码登录管理员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在我的本地主机(LAMP)上新安装了 Magento(1.7.0.2).现在安装后,当我想去管理面板时,它要求我输入用户名和密码.虽然我使用了正确的用户名和密码,但它仍然显示 Invalid User Name or Password.我清除了我的浏览器 cookie,但它再次向我显示了与登录相同的问题.我在谷歌上搜索并得到了一些我可以使用 http://127.0.0.1 而不是 http://localhost 登录的东西.但它仍然不适合我.我在谷歌上搜索了一整天,正如 pe 一些博客所说,只需在 varien.php 文件中进行一些行注释,我也在 varien.php 文件中进行了注释,但仍然对我不起作用(因为这里我使用的是 1.7.0.2 和他们在博客中讲述了 1.6.X ).我今天已经安装了 4 次 magento,但我仍然一次又一次地面临同样的问题.有人可以告诉我如何解决这个问题吗?任何帮助和建议都将非常值得赞赏.

I just freshly installed Magento(1.7.0.2) on my localhost(LAMP). Now after installation when I wanted to go for the admin panel it asked me for the username and password. Although I used right username and password still its showing Invalid User Name or Password. I made clear my browser cookie but again it showed me the same problem with login. I searched over google and got something that I can login using http://127.0.0.1 instead of http://localhost. But it still not working for me. I have searched over google whole day and as pe some blogs have told that just make some line comments in varien.php file, I also made comments in varien.php file but still its not working for me(as here I am using 1.7.0.2 and in blogs they have told about 1.6.X ). I have installed magento 4 times today already but still I am facing the same problem again and again. Can someone tell me how to solve this? Any help and suggestions will be really appreciable.

推荐答案

如果您无法使用正确的用户名和密码登录,这里有一些建议.如果您使用 google chrome 安装 magento,请使用 firefox 打开 magento 并编辑 magento 目录中的 app/code/core/Mage/Core/Model/Session/Abstract/Varien.php 文件和评论以下几行

If you are having trouble to get logged in with the correct username and password, here are some ideas. If you have used google chrome to install magento, use firefox to open magento and edit the app/code/core/Mage/Core/Model/Session/Abstract/Varien.php file within your magento directory and comment those below lines

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

并使用您的凭据登录.我希望这对您有用!!!

And use your credentials to log in. I hope this works for you!!!

这篇关于Magento 无法使用正确的用户名和密码登录管理员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆