Sometimes it can happen that you have everything installed on your development server and you cannot log in. Plus the system also does not indicate that you username or password is incorrect. In most cases, this can be solved by modifying the code in the Varian.php file.

This file can be found ( in Magento version 1.9.2.1) at the following location :

app\code\core\Mage\Core\Model\Session\Abstract\Varien.php

You then exclude certain code in the file :

-------------------------------------------------

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

/* if (!$cookieParams['httponly']) {
 unset($cookieParams['httponly']);
 if (!$cookieParams['secure']) {
 unset($cookieParams['secure']);
 if (!$cookieParams['domain']) {
 unset($cookieParams['domain']);
 }
 }
 }

if (isset($cookieParams['domain'])) {
 $cookieParams['domain'] = $cookie->getDomain();
 }*/

-------------------------------------------------

If you have version 1.9.2.1 of magento, you can also download and replace the file below. To be on the safe side, always keep the old file.

Click here to download the modified Varien.php file