Can’t login into admin panel of Magento [SOLVED]
If you Can’t log in to the admin panel during Magento Website Development, Check the solution given below.
Manier times it happens that Magento admin doesn’t allow you to log in after installation.
After a long time searching and research in Magento, we found the solution. Today We will explain to you the problem and the solution. If this solution doesn’t work then you can hire Magento developer and get this problem solved.
Facts about Magento
Magento is one of mostly used Opensource for E-commerce Website development. It is a top-level open source in the E-commerce category.
Now let’s focus on a problem and the solution of the problem.
Problem
Manier times you might have faced a problem for invalid username and password during Magento Website Development.
In fact, in the “Log in to Admin Panel” window whenever you provide wrong password/username combination it displays “Invalid Username or Password.” But whenever you provide correct password it does not show anything.
Though a new URL like
http://127.0.0.1/magento/index.php/admin/index/index/key/ d135be4de664ab83db829120740e058a/ is displayed on the address bar. Every time you do this you can’t log in to the admin panel.
The reason for the problem
Do you know why this problem occurs? The problem occurs because magneto could not store cookies. We run it as localhost and localhost is not true domain but to store cookies, we need a domain. That’s why login stops without saying any word.
Now the time comes for solutions. There are two solutions to this problem which are shown below :
Solutions
First Solution
In different forums, I saw they mentioned connecting as http://localhost/magento/index.php/admin will fail but if you connect as http://127.0.0.1/magento/index.php/admin it will work. But in my case IP address in the URL did not work too.
I made it work into whenever I changed my browser. Suppose I installed Magento using google chrome browser and I open admin URL into my firefox window and it worked. Though in the firefox the URL http://localhost/magento/index.php/admin did not work, but URL http://127.0.0.1/magento/index.php/admin worked fine.
Second Solution
Go to app/code/core/Mage/Core/Model/Session/Abstract/Varien.php file within your magento directory.
Find the code :
session_set_cookie_params($this->getCookie()->getLifetime(),$this->getCookie()->getPath(),$this->getCookie()->getDomain(),$this->getCookie()->isSecure(),$this->getCookie()->getHttponly());
And Replace with
session_set_cookie_params($this->getCookie()->getLifetime(),$this->getCookie()->getPath()//$this->getCookie()->getDomain(),//$this->getCookie()->isSecure(),//$this->getCookie()->getHttponly());
Now save your file and try to login into the admin.
I think it should be work now.
If this blog didn’t solve your problem then Hire Certified Magento Developer and take advance guidance.
Read also:
Comments