Magento can’t login admin panel after installed

7

If you are not installed magento previously this is a problem you faced.After installation magento returns a message that the installation was successful and you can proceed to the administration panel. Although providing the correct username / password, magento does not show anything. Providing wrong username / password , magento returns the message “Invalid Username or Password”.If you login from different browser same effect will happening.

The login attempt was made through the “localhost ” or ” 127.0.0.1? socket , but you can’t log in to admin panel.The problem occurs because magneto could not store cookies. Localhost and “127.0.0.1? are not true domains , and browsers allow only real domains to store cookies ,that’s why login stops without any indication.

If not success read the configurations of your server through phpinfo() file, is the module “mode_rewrite” loaded?

Solution-1

If you are using 127.0.0.1 change it into localhost.If you are using localhost change it into 127.0.0.1.
Then try to login.

Ex:
http://localhost/magento_site/
http://127.0.0.1/magento_site/

Solution-2

1-Go to following file and open it.I’m using is 1.4.0.1

app\code\core\Mage\Core\Model\Session\Abstract\varien.php

2-Search for “// session cookie params” line(77) .
Change,

to

3-Comment the below mentioned code(line number 86).

Final script like this.
Magento can’t login admin panel after installed

4-Now login as admin, it will work!

Solution-3

Go to the following folder and delete all folders in it.
/var/cache
/var/session

Try to log into the admin panel.

Solution-4

Go to the database and open “core_config_data” table and find the correct data is exist in the following records.
web/secure/base
web/unsecure/base
web/cookie/cookie_domain
web/cookie/cookie_path

That’s only.

Share.

About Author

Sumith Harshan is the Web Engineer Specializes in Java Script, JQuery, HTML4/5, CSS2/3, PHP, CodeIgniter, CakePHP, J2SE, J2EE, XML, Hacking & Security, Mobile Interface Developing, Magento, Wordpress, Joomla, Drupal,PHPBB,Facebook App Developing and Open cart...etc.