jump to navigation

After installing magento can’t log in to admin panel March 17, 2011

Posted 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 ”″ socket , but you  can’t log in to admin panel.The problem occurs because magneto could not store cookies. Localhost and “” 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 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.



1. ouz - June 14, 2011

this solution is not work in magento 1.5 edition,
using local server : xampp

tournasdimitrios1 - June 14, 2011

This article was targeted to an wamp installation .
Read the configurations of your server through phpinfo() file , is the module ” mode_rewrite” loaded ? If not edit apache/conf/httpd.conf
Un-comment the following line :
LoadModule rewrite_module modules/mod_rewrite.so ==>> (remove #)

If this wasn’t a solution , let me know , and I ‘ll make the installation on xamp .

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s