After installation on localhost with apache server I am unable to login to admin area. tried to change password using md5 through phpmyadmin but still I can not login. Without admin login the software cannot be used. A good software without proper support will be lost in this competitive business of software.
I would like to add my experience with this same problem. For me it was because I was using localhost and admin needs to have dots in the hostname.
I altered the /app/etc/config.xml file to change the host from “localhost” to “127.0.0.1” then deleted all files within /var/cache.
That was it! Even when logging in with the url http://localhost/index.php/install it automatically redirects to 127.0.0.1 for me. This is quicker than reinstalling completely.
Found a solution to this issue. The problem has to do with the short lifetime (just 1 hour—3600 seconds) Magento assigns to cookies by default. If your local PC’s time is more than 1 timezone ahead of your server’s time, your browser will interpret the cookie as already expired as soon as it’s written. For some reason Firefox can work around this issue, but Chrome can’t.
If you’re able to log into admin via Firefox, go to System > Configuration > Web > Session Cookie Management, and change the Cookie Lifetime to 86400 (1 day) instead of 3600 (1 hour).
If you’re unable to log into admin even when using Firefox, it’s possible to make this change directly in the mysql database. In phpMyAdmin or similar DB admin tool, run this SQL command:
update core_config_data set value=86400 where path=’web/cookie/cookie_lifetime’
I just installed magento, and access by ip 192.168.xx.xx
after installation, i can’t access to the admin by safari 4. (mac)
and then i tried Firefox . works fine!!..
no wonder if there is a browser compatibility problem… (i tried to install magento before on a domain xxxxxxxx.com and was fine to access from safari )
modify the core Magento code (keep in mind you may have to re-apply the fix if you update the code Magento code) - go to: app/code/core/Mage/Core/Model/Session/Abstract and open up varien.php, and comment out lines 73 (comment out the comma at the end of the line) through 76 so that it looks like the following:
// set session cookie params
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath() //remove this after putting on server (leave the comma) ,
//$this->getCookie()->getDomain(),
//$this->getCookie()->isSecure(),
//$this->getCookie()->getHttponly()
);
Also you can try the follow methods instead:
1) you can reference your admin page by using http://127.0.0.1 (this way it has periods in the host name) instead of localhost or
2) if you are on windows xp, add a host record in your hosts file by going to: C:\WINDOWS\system32\drivers\etc and have 127.0.0.1 point to something like magento.localhost
modify the core Magento code (keep in mind you may have to re-apply the fix if you update the code Magento code) - go to: app/code/core/Mage/Core/Model/Session/Abstract and open up varien.php, and comment out lines 73 (comment out the comma at the end of the line) through 76 so that it looks like the following:
// set session cookie params
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath() //remove this after putting on server (leave the comma) ,
//$this->getCookie()->getDomain(),
//$this->getCookie()->isSecure(),
//$this->getCookie()->getHttponly()
);
I was having trouble with this as well. I could log on with firefox but not with chrome or IE, tried several dif. computers. My fix was going into the database and to the core_config_data and making the “web/cookie/cookie_domain” field blank. Don’t know if that will hurt anything else but it’s letting me login now
I had the same issue until I tried something other than localhost or 127.0.0.1 in the address bar. Since i’m just testing, I setup a rule in my hosts file and this resolved the issue.
it works fine with and solve the problem, so if you work on local host you need to put 127.0.0.1 then the admin password will works fine.
many thanks
Works wonderfully! Thank you.
Note for other users: Make sure you put in 127.0.0.1 in during your install basename or else all of the links will still reference localhost and not work in the admin.
For me it worked by just changing the development domain from magento to magento.com.loc. Probably browsers do not allows set-cookie header with [domain=magento;] which means 1-level domain name.
Funny- I was working on mine after install it refused admin log in. I double clicked time, Pointed to Internet time activated Sync, Tried to login and it worked fine.