Sunday, April 17, 2016

How to solve Magento admin panel log in problem on localhost XAMPP

Most of the developers install Magento on local servers such as XAMPP, WAMP etc. One common problem that arises after such installation is that the admin is not able to log into the admin panel (backend panel) even after entering the correct username and password. Let's try to understand what the problem is below:

The Problem:

1. Magento admin tries to log into the admin panel by going to url- localhost/magento/index.php/admin . Then this screen appears:-

2. The admin tries to enter the correct username and password. Even after entering the correct username and password combination, the page just reloads back. No incorrect password or username warning is displayed. that means the username and password are surely correct.

The Solution:

There is a simple solution to this problem. This can be solved easily by editing the Varien.php in Magento directory.

1. Inside your root server folder, find your root Magento directory. Navigate to the path highlighted below-


2. Locate and open the Varien.php file into a text editor of your choice (I use Notepad++).

3. Inside the Varien.php file, find 'cookieParams' by pressing ctrl+F.

4. Comment out the following piece of code colored green.

5. Now go back to your admin panel log in page and enter your correct username and password. Your username and password combination should work now and admin dashboard should appear.

I have tested this solution for Magento installation Version 1.9.2 and XAMPP installation version 5.6.3.