I downloaded 1.8 version and installed it on my localhost, when i was done with install, i tried logging into backend. But it won't let me login, neither it gives me any error but refresh the admin page, i tried giving it wrong password and it prompted about invalid username and password. If so, why isn't my password and login working whereas there is no message of invalid login or password. just same admin page reloads?
3 Answers
This has happened to me before when using a URL without a FQDN, for example magedev
. I had to change it to magedev.local
in order to get Magento working correctly. Not using the FQDN also caused Magento to not install the database fully (all of the tables were there but some of the core data was missing).
Another solution, if you are sure that you are using a FQDN and Magento has installed itself correctly, is to try clearing all of your domain cookies. I've ran into an issue before with them getting "stuck" for lack of a better term and not allowing me to log in.
Open the File : app\code\core\Mage\Core\Model\Session\Abstract... and check the code in
$cookieParams = array(
'lifetime' => $cookie->getLifetime(),
'path' => $cookie->getPath(),
'domain' => $cookie->getConfigDomain(),
'secure' => $cookie->isSecure(),
'httponly' => $cookie->getHttponly()
);
Comment the last three array parameters( domain, secure, httponly)and then try to login
If the issue is the same then comment the
if (isset($cookieParams['domain'])) {
$cookieParams['domain'] = $cookie->getDomain();
}
call_user_func_array('session_set_cookie_params', $cookieParams);
if (!empty($sessionName)) {
$this->setSessionName($sessionName);
}
and try to login .. surly it will work for you. :)
-
1
-
-
1Generally, it seems like browser is not storing the cookies as domain name is not specified. Instead of commenting, you can try by using IP such as htp://127.0.0.1/magento in place of localhost/magento. I personally like to use localhost/magento way so I comment that. Oct 20, 2013 at 17:00
-
localhost
as base url. Use 127.0.0.1 or a virtual host.