0

I have a server setup locally with Vagrant which is running nginx + php5-fpm + mysql + varnish. I've disabled varnish for now just to rule that out.

I've been having issues when trying to login into a customer account on the frontend - it redirects backs to the homepage. The domain is set as www.site.local. I can log in into the admin area fine.

It appears that when redirecting to a successful login, it's creating a new session but not updating the cookie.

When running it via Lynx on the server itself, the cookie is set to fine - the only difference I can see is that it's using 127.0.0.1 as the domain rather than www.site.local

I tried the suggestion on this article - http://www.novusweb.com/1340/e-commerce-technology/fix-for-passing-magento-session-ids - and it works, but I'd rather not have to modify code when there's likely something server-side that can be changed.

If you need any of the configurations of the server I can update the post.

3
  • I've not attempted disabling any modules but the site is currently running on a LAMP stack and it's not having this issue.
    – Paul
    Commented Mar 13, 2013 at 16:29
  • It is correct yes.
    – Paul
    Commented Mar 13, 2013 at 16:37
  • Well after all of that, the problem was due to the Aoe_Static module. For whatever reason, when passing in the sid when rendering the blocks, it was losing the session. When commenting that line out, it works.
    – Paul
    Commented Mar 16, 2013 at 16:50

1 Answer 1

2

Change the domain from 127.0.0.1 to something else, eg. site.local

There are reported issues of cookie problems when using localhost or 127.0.0.1 (or any variations of the loopback adapter) as the domain name.

1
  • Thanks for the response. The domain is being set as site.local on the one that isn't allowing me to log in - the test I did on the server itself used 127.0.0.1 and did work. When I commented out the renewSession() function on the customer, it's worked fine.
    – Paul
    Commented Mar 13, 2013 at 17:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.