Login admin problem Magento on localhost

Sometime magento generate a problem with admin login. Not so worry follow me:

go to here: \magento\app\code\core\Mage\Core\Model\Session\Abstract
and open Varien.php file.
Now comment the three lines from like this:

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

and try to login again to admin.

I hope its work for you.