Magento – Admin login doesn’t work

Hi together,

and again a problem with a software. This time is the the online shop software Magento.
Direct after the installation you should be able to log in to the administration area. Theoretically. But I couldn’t. Username and password was entered correctly. There was also no error message, that something is wrong – not like I would have entered really wrong data, then an error message would occur.
Like that I stuck on the log in page and didn’t got forwarded to the administration area.

That is very annoying and of course I was searching the mistake first by myself… and entered the information again and again.
But there is really an error in the software (in the cookie handling).
Just search the following code in the file „app/code/core/Mage/Core/Model/Session/Abstract/Varien.php„:

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

(approx. line 77) and replace it with:

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

Now it should work.

0 Kommentare

Hinterlasse einen Kommentar

An der Diskussion beteiligen?
Hinterlasse uns deinen Kommentar!

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert