Showing posts with label frontend. Show all posts
Showing posts with label frontend. Show all posts

Thursday, October 11, 2012

Can not login to magento admin and frontend

Im using centos. I had a problem, Magento frontend and admin login doesn’t work and loops back to login with no message. This happens because of session cookie problem. I solved this problem by installing ntp

In your shell type the below command to install ntp

    # yum install ntp

Turn on ntp service

    # chkconfig ntpd on

Synchronize system clock with 0.pool.ntp.org server:

    # ntpdate pool.ntp.org

Start the NTP service:

    # /etc/init.d/ntpd start
 
Now check whether this has solved the cookie problem. If not try the following. comment the below lines in "/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php".

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();
}

Wednesday, October 5, 2011

How to enable template path hints in magento admin panel?

1. Admin > System > Configuration
2. Switch your "Current Configuration Scope" to your store (’Main Website’ on a stock build)
3. Click on the Developer Tab (bottom left) and find the Debug area
4. Template Path Hints: Yes (also might want to add Block Names to hints)