2

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
    Don't use localhost as base url. Use 127.0.0.1 or a virtual host. – Marius Oct 20 '13 at 10:53
1

Instead of using localhost I used 127.0.0.1 This solved the issue.

2

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.

-3

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
    Why you need to change core file? – mageUz Oct 20 '13 at 14:56
  • @MagnetoBoy The first trick worked, why wasn't it working before? – Nofel Oct 20 '13 at 16:42
  • 1
    Generally, 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. – MagentoBoy Oct 20 '13 at 17:00
  • Editing a core file should never be the correct answer. – Joseph Leedy Oct 21 '13 at 1:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.