ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

MSM Login issue

September 13, 2007 3:53pm

Subscribe [3]
  • #1 / Sep 13, 2007 3:53pm

    Adam Stacoviak

    34 posts

    I’m setting up a new site using the MSM. The issue I’m having is that if I’ve logged into the public view and later try to access the Control Panel the CP form simply returns back to the login form, but the session param in the URL is set.

    Basically I can’t log into the CP without first logging out from the front-end.

    The only thing that I can see that might be making this happen is that I’m masking the control panel directory by using mydomain.com/cms as the CP access link instead of system.

    Anyone have any thoughts on what would cause this issue?

    Thanks!

    Adam

  • #2 / Sep 13, 2007 4:05pm

    Lisa Wess

    20502 posts

    A few questions -

    1) EE Version
    2) EE Build
    3) Is /cms/ the system directory or a renamed admin.php or?
    4) Are you using cookies, sessions, or both?  Is this happening in all Sites?
    5) What browser is this occurring in?

  • #3 / Sep 13, 2007 4:16pm

    Adam Stacoviak

    34 posts

    Sorry Lisa—I should have included that with my original post.

    1) EE Version == 1.6.0
    2) EE Build == build 20070815
    3) Is /cms/ the system directory or a renamed admin.php or?

    /cms/ is the masked directory with the admin.php file renamed to index.php

    4) Are you using cookies, sessions, or both?  Is this happening in all Sites?

    Sessions is on in the CP, but only cookies in the front-end. Yes this is happening for all sites.

    5) What browser is this occurring in?

    Firefox 2.0

    Thanks Lisa!

  • #4 / Sep 13, 2007 4:21pm

    Lisa Wess

    20502 posts

    The masked directory? I’m not familiar with that.  Does this happen if you visit the /system/ directory directly?

  • #5 / Sep 13, 2007 4:27pm

    Adam Stacoviak

    34 posts

    Yes, this happens even if I go to the actual login directory for the CP. Here are the details on Masking Access to the CP

  • #6 / Sep 13, 2007 4:33pm

    Lisa Wess

    20502 posts

    Yes, I know where the instructions are in the docs, I’ve just not seen someone put it in a separate directory just for that purpose before - I’ve only seen them rename the file, as such.

    What do you have set for the cookie domain?

  • #7 / Sep 13, 2007 4:37pm

    Adam Stacoviak

    34 posts

    I haven’t set the domain for the cookie, plus I’ve haven’t used that feature yet.

  • #8 / Sep 13, 2007 4:40pm

    Lisa Wess

    20502 posts

    Can you try setting the domain for the cookie and see if that helps?

  • #9 / Sep 13, 2007 4:47pm

    Adam Stacoviak

    34 posts

    I updated the cookie domain to .mydomain.com, and set the prefix for the cookie as well.

    It now works to login into the front-end and then also login to the CP, however…now it’s not letting switch sites inside the CP.

  • #10 / Sep 13, 2007 5:00pm

    Lisa Wess

    20502 posts

    What happens when you attempt to switch Sites? Did you set the cookie domain for all sites? And what, exactly did you set it to?

  • #11 / Sep 13, 2007 5:07pm

    Adam Stacoviak

    34 posts

    I set the cookie domain to .mydomain.com, and set the prefix for the cookie as well.

    When I swap sites using the sites tab selector, it reloads the page but the breadcrumbs just under the CP navigation stays set to the domain the cookie domain was set to.

  • #12 / Sep 13, 2007 5:13pm

    Lisa Wess

    20502 posts

    Are you testing this as a super-admin, and are you logging in directly through the /system/ directory for testing?  Also, try removing the cookie path and only setting the cookie domain.

  • #13 / Sep 13, 2007 5:33pm

    Adam Stacoviak

    34 posts

    I have been testing this as a super-admin the entire time.

    Setting the domain for the cookies site-wide for both domains seems to have done the trick.

    For example:

    .mydomain.com & .otherdomain.com

    I removed the prefix, cleared my cookies for the two domains, and everything seems to be on track.

    NOTE

    As mentioned at the Cookie Settings page of the docs, the preceding dot at the beginning it is very important to allow the cookies to work regardless of whether people specify your URL with the www part or only the http:// part.

    Thanks for the guidance Lisa, much apprecaited!

  • #14 / Sep 13, 2007 5:42pm

    Lisa Wess

    20502 posts

    Glad to hear you got it working, Adam!  Yes, leaving off the preceding period will lock you out of your installation, we get a few of those; it’s easy to fix, but it can be scary for someone who hasn’t encountered it before. =)

  • #15 / Sep 13, 2007 5:51pm

    Adam Stacoviak

    34 posts

    Do you think I should post a note about the domain cookie settings at the Creating a New Site page at the docs?

    Near the bottom of that page it talks about setting up domains and sub-domains as well as masking the control panel access.

    Seems to me like setting the domain cookie for each site was must. Am I right?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases