Magento无法使用正确的用户名和密码登录管理员

问题描述:

我刚刚在本地主机(LAMP)上新安装了Magento(1.7.0.2).现在安装后,当我想进入管理面板时,它要求我输入用户名和密码.尽管我使用了正确的用户名和密码,但仍然显示Invalid User Name or Password.我弄清楚了我的浏览器cookie,但再次显示出与登录相同的问题.我在Google上进行了搜索,发现可以使用http://127.0.0.1而不是http://localhost登录的内容.但是它仍然对我不起作用.我整天都在google上搜索,正如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!!!