Magento can't login in admin with right username and password

前端 未结 11 2467
南笙
南笙 2020-12-24 10:17

I just freshly installed Magento(1.7.0.2) on my localhost(LAMP). Now after installation when I wanted to go for the admin panel it asked me for the username and

相关标签:
11条回答
  • 2020-12-24 10:22

    If you are having trouble to get logged in with the correct username and password, here are some ideas. If you have used google chrome to install magento, use firefox to open magento and edit the app/code/core/Mage/Core/Model/Session/Abstract/Varien.php file within your magento directory and comment those below lines

            $cookieParams = array(
                'lifetime' => $cookie->getLifetime(),
                'path'     => $cookie->getPath()
                // 'domain'   => $cookie->getConfigDomain(),
                // 'secure'   => $cookie->isSecure(),
                // 'httponly' => $cookie->getHttponly()
            );
    

    And use your credentials to log in. I hope this works for you!!!

    0 讨论(0)
  • 2020-12-24 10:28

    This issue also occurs when the disk quota is exceeded on the server and presumably the session info can not be written to disk if file-based cookie storage is used.

    0 讨论(0)
  • 2020-12-24 10:33

    It's not right way to comment cookie params cause in future it will be push on server and make many problems. I know this from personal experience.

    The best solution is rename the local url into a form more or less has the appearance of a typical url, having at least a point in a row. As example: http://yoursitename.local

    0 讨论(0)
  • 2020-12-24 10:39

    **As mentioned by james. This method worked for me. This is a better option rather than changing the code. It worked for me for 127.0.0.1 as well as localhost and after deleting app/etc/local.xml. Delete the browser cookies. Run in your browser the installation of magento

    localhost/magento/index.php.install.htm

    and set your username & password again. Login to your admin panel. I didn't have to delete the database of magento so my data was safe.****

    0 讨论(0)
  • 2020-12-24 10:39

    It's working for me.. Please follow below instruction

    Goto System->Configuration->Web->Session Cookie Management

    change the option 'Use HTTP only' to 'No'

    0 讨论(0)
  • 2020-12-24 10:40
         If you are suffering to get logged in with the correct username and password. replace the code with the New code 
    
        Original code:-
        $cookieParams = array(
                    'lifetime' => $cookie->getLifetime(),
                    'path'     => $cookie->getPath(),
                    'domain'   => $cookie->getConfigDomain(),
                    'secure'   => $cookie->isSecure(),
                     'httponly' => $cookie->getHttponly()
                );
    
        New Code:-
         $cookieParams = array(
                    'lifetime' => $cookie->getLifetime(),
                    'path'     => $cookie->getPath()
        /*,
                    'domain'   => $cookie->getConfigDomain(),
                    'secure'   => $cookie->isSecure(),
                     'httponly' => $cookie->getHttponly() */
                );
    File Path :-app/code/core/Mage/Core/Model/Session/Abstract/Varien.php
    
    0 讨论(0)
提交回复
热议问题