問題描述
我剛剛在我的本地主機(jī)(LAMP)上新安裝了 Magento(1.7.0.2)
.現(xiàn)在安裝后,當(dāng)我想去管理面板時,它要求我輸入用戶名和密碼.雖然我使用了正確的用戶名和密碼,但它仍然顯示 Invalid User Name or Password
.我清除了我的瀏覽器 cookie,但它再次向我顯示了與登錄相同的問題.我在谷歌上搜索并得到了一些我可以使用 http://127.0.0.1
而不是 http://localhost
登錄的東西.但它仍然不適合我.我在谷歌上搜索了一整天,正如 pe 一些博客所說,只需在 varien.php 文件中進(jìn)行一些行注釋,我也在 varien.php 文件中進(jìn)行了注釋,但仍然對我不起作用(因?yàn)檫@里我使用的是 1.7.0.2 和他們在博客中講述了 1.6.X ).我今天已經(jīng)安裝了 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()
);
并使用您的憑據(jù)登錄.我希望這對您有用!!!
And use your credentials to log in. I hope this works for you!!!
這篇關(guān)于Magento 無法使用正確的用戶名和密碼登錄管理員的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!