After installing magento can’t log in to admin panel March 17, 2011Posted by Tournas Dimitrios in Magento.
While installing magento on Windows XP box (wamp 2.0) or on a Linux (CentOs 5.5 box) , and you have provided admin username and password , magento returns a message that the installation was successful and you can proceed to the administration panel . Although providing the correct credentials (username / password) , magento does not show anything . Providing wrong credentials , magento returns the message ” Invalid Username or Password” .
The log-in attemt 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 .
Solution to the problem :
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. They also mentioned to connect to magento’s page with an different browser from which the installation where made (Firefox , Google Chrome , IE ) . On my case neither mentioned solution gave me log-in to magento’s panel .
I found this solution : Go to app/code/core/Mage/Core/Model/Session/Abstract/Varien.php file within your magento directory and comment out these 3 lines of code :
The arrow indicates that also the comma must be removed from the file .Save it and try to login to your magento admin panel.