Tuesday, January 19, 2010

Magento after installtion can not able to login

Solution:
I googled and found these solutions:-

a) Use 127.0.0.1 instead of localhost in your url, i.e. using http://127.0.0.1/magento/index.php/admin instead of http://localhost/magento/index.php/admin . But this didn’t solve my problem.

b) Since I am using Linux, I was suggested to open "hosts" file from /etc/hosts and have 127.0.0.1 point to something like magento.localhost or even 127.0.0.1 point to http://www.localhost.com.
But this option i not tested.

c) This solution finally helped me out of this problem. The solution was to modify the core Magento code. Open app/code/core/Mage/Core/Model/Session/Abstract/Varien.php.
Comment out the lines 80 to 83. The line number may vary according to the Magento version. But these lines are present somewhere near line 80. You have to comment the comma (,) in line: $this->getCookie()->getPath()//,

// set session cookie params
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()//,
//$this->getCookie()->getDomain(),
//$this->getCookie()->isSecure(),
//$this->getCookie()->getHttponly()
);

No comments: