Thursday, November 19, 2009

How to Run Magento in Localhost

This is very basic problem for a newbie in magento. Every time people stuck on the admin login page when you put your username and password in respective fields it doesnt allow to enter in to the admin section .So here we go to resolve this problem


Go to this pageapp/code/core/Mage/Core/Model/Session/Abstract/Varien.php

and find the session_set_cookie_params(line-78) and replace your code with this

session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()
//$this->getCookie()->getDomain(),
//$this->getCookie()->isSecure(),
//$this->getCookie()->getHttponly()
);
i am very sure that this trick will help you on localhost but this problem does not occur in webhost .so enjoy :)