MSM Can’t log in / switch sites
Posted: 30 July 2008 12:25 PM   [ Ignore ]  
Grad Student
Rank
Total Posts:  78
Joined  03-11-2007

I’ve posted about this before but didn’t really get a full answer.  Then I’ve been looking around at forum posts about the same issue and I’ve seen some solutions posted but none of them worked for me.  I’ve tried everything listed in the KB and Wiki with no success.  I’m running a very recent version of EE as well (updated 2 weeks ago).

In short, here’s the problem:

You have a single EE site, it works great.  You install MSM, add a new site, it works for a while, then for some reason one day you just can’t log back in.  You try everything, but the only way to log back in is to manually edit the config file and set the MSM mode to “n.”  Once it’s set to “n” you can log back in, go in through the control panel, and turn MSM back on.  Unfortunately, even with it back on, if you try to switch sites nothing happens.

I’ve tried using sessions, using cookies, using both…you name it.  I don’t know why the MSM hates me so much, but this is the 3rd MSM installation where this has happened and all of them are on different servers.

Thoughts?

Profile
 
 
Posted: 30 July 2008 02:53 PM   [ Ignore ]   [ # 1 ]  
Grad Student
Rank
Total Posts:  78
Joined  03-11-2007

So a moderator just moved this thread from technical support to “how-to.”  This isn’t a how-to thread…this is clearly a bug with MSM and is a request for technical support regarding the bug.

Why did you move this to a forum where people that might be able to help me wouldn’t be looking?

Profile
 
 
Posted: 30 July 2008 02:54 PM   [ Ignore ]   [ # 2 ]  
Grad Student
Rank
Total Posts:  78
Joined  03-11-2007

Oook…and now the thread is back in technical support.  Strange ...

Profile
 
 
Posted: 30 July 2008 03:12 PM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  29130
Joined  05-15-2004

No, this is not a Howto thread. I made an error, moving the wrong thread, and corrected it within 30 or so seconds smile Now to your problem:

You have a single EE site, it works great.  You install MSM, add a new site, it works for a while, then for some reason one day you just can’t log back in.

That is strange, at least. Luckily, things tend not to break on their own. Can we rule out any changes to the server environment, anything like that?

I’ve tried using sessions, using cookies, using both…you name it.  I don’t know why the MSM hates me so much, but this is the 3rd MSM installation where this has happened and all of them are on different servers.

But the client PC is the same always? There are a few other things you can try, like disabling secure forms and not require an IP-Address from the user agent. I’d probably use cookies exclusively, for the time being, so we don’t have to deal with session ids.

Are you on the very latest build with both EE and the MSM?

 Signature 

ExpressionEngine 2.0 Downloads | Docs | Bugtracker

“If the English language made any sense, lackadaisical would have something to do with a shortage of flowers.” (Doug Larson)

Profile
MSG
 
 
Posted: 30 July 2008 03:41 PM   [ Ignore ]   [ # 4 ]  
Grad Student
Rank
Total Posts:  78
Joined  03-11-2007

This problem has been experienced on multiple server environments, all without change at the time of it breaking.  One server is running Apache 1.3, another Apache 2.0.  One is using PHP 4, another PHP 5, etc.  However, when the login just fails nothing on the server has changed.

The client PC (or in this case a Mac smile) is always the same.  It doesn’t matter if I use Safari or Firefox.

I’ll update EE and MSM (if there even is an update available) as I just did it 2 weeks ago.


In my previous thread about this I spoke about how using a masked admin panel would work for getting logging in to the bugged MSM.  For example, say I had 5 MSM sites, A through E.  The control panel URL’s would be something like:

siteA.com/system (the primary site / system folder)
siteB.com/admin (a masked admin URL that just uses the path.php file to load Site A’s system folder)
siteC.com/admin (same as above)
siteD.com/admin (same as above)
siteE.com/admin (same as above)

One day, SiteA.com/system would fail to log me in.  It would basically just refresh the login page and blank out the input boxes and not let me in.  However, if I went to siteB.com/admin and logged in it would work, I could change sites back and forth, everything was peachy.  Then another day would come along where Site B’s login would break, and I’d have to start using site C.  This would continue until site E broke and I was completely locked out.

I have a feeling that there is some kind of bug where if you get logged out while you’re switched to a site other than the site that is assigned to the admin panel you logged in to, then it breaks.  In other words, if you log in at siteB.com/admin, switch to site C, make some changes, and log out, siteB.com/admin will never work again.  This is just a hunch though.

Profile
 
 
Posted: 30 July 2008 03:54 PM   [ Ignore ]   [ # 5 ]  
Grad Student
Rank
Total Posts:  78
Joined  03-11-2007

I just went and looked and the build I have installed is 20080710, which is the current build.  So there’s nothing I can do on that front…

Profile
 
 
Posted: 30 July 2008 03:54 PM   [ Ignore ]   [ # 6 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  29130
Joined  05-15-2004

Yes, please check to see if there is an update available. I vaguely recall a similar problem. Also, let us know if disabling secure forms helps. You could try adding this to your config.php:

$conf['secure_forms'] = "n";
$conf['cookie_domain'] = ".example.com";
$conf['cookie_path'] = "";
$conf['cookie_prefix'] = "";
$conf['admin_session_type'] = "c";
$conf['require_ip_for_login'] = "n";
$conf['require_ip_for_posting'] = "n";
 Signature 

ExpressionEngine 2.0 Downloads | Docs | Bugtracker

“If the English language made any sense, lackadaisical would have something to do with a shortage of flowers.” (Doug Larson)

Profile
MSG
 
 
Posted: 30 July 2008 04:19 PM   [ Ignore ]   [ # 7 ]  
Grad Student
Rank
Total Posts:  78
Joined  03-11-2007

OK so after doing that I can log in (well, I didn’t even have to…just refreshing the page logged me in) and now I can’t log out or switch sites.

Profile
 
 
Posted: 30 July 2008 04:35 PM   [ Ignore ]   [ # 8 ]  
Grad Student
Rank
Total Posts:  78
Joined  03-11-2007

Alright, so it looks like I may have found the problem.  Not sure.

I put the site back to using sessions and cookies.  Cookies only just made it so I couldn’t switch sites or log out.

Once it was back to sessions and cookies, I went to http://www.siteA.com/system instead of just siteA.com/system.  Poof…it works.  I can change sites, I can log in, etc.  If I go to just siteA.com/system (without the www) I can’t change sites.

If typing www is all I need to do to fix the problem I’m fine with that…I’ll let you know if this ever happens again while using www.

Profile
 
 
Posted: 30 July 2008 04:57 PM   [ Ignore ]   [ # 9 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  29130
Joined  05-15-2004

This sounds like a cookie domain issue. Try setting it to .example.com, ie with a leading dot. It should then worl for all subdomains of example.com, including http://www.exameple.com.

 Signature 

ExpressionEngine 2.0 Downloads | Docs | Bugtracker

“If the English language made any sense, lackadaisical would have something to do with a shortage of flowers.” (Doug Larson)

Profile
MSG
 
 
Posted: 30 July 2008 05:08 PM   [ Ignore ]   [ # 10 ]  
Grad Student
Rank
Total Posts:  78
Joined  03-11-2007

Yeah, it’s not though.  That’s the strange thing.  It’s already set to .siteA.com, but http://www.siteA.com works and siteA.com doesn’t.

Profile
 
 
Posted: 30 July 2008 08:55 PM   [ Ignore ]   [ # 11 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  20972
Joined  04-29-2002

Have you seen the following article: EEKB: Troubleshooting MSM Login Issues

See if that helps.

 Signature 

EE 2.01PB - 2.x Bug Tracker | Docs | Upgrade from 1.x to 2.x | Build Update Instructions | 1.6.x Update Info

Most recent 2.x version: Build 20100215
Don’t forget to upgrade MSM and Forum as needed!

Profile
MSG
 
 
Posted: 30 July 2008 08:59 PM   [ Ignore ]   [ # 12 ]  
Grad Student
Rank
Total Posts:  78
Joined  03-11-2007
RealityDesign - 30 July 2008 12:25 PM

I’ve tried everything listed in the KB and Wiki with no success.

Yes, I’ve tried that.. :(

Profile
 
 
Posted: 31 July 2008 08:08 AM   [ Ignore ]   [ # 13 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  25612
Joined  05-20-2002

Hm- keep in mind, editing the config.php overrides all of the individual settings.  Also:

I have a feeling that there is some kind of bug where if you get logged out while you’re switched to a site other than the site that is assigned to the admin panel you logged in to, then it breaks.  In other words, if you log in at siteB.com/admin, switch to site C, make some changes, and log out, siteB.com/admin will never work again.

I think what’s going on there- when you leave an msm cp, next time you visit it, it should take you to the last msm backend that you had open on that particular cp.  Assuming the cookie is still set.

I think what I would do- leave the config.php alone while you can still get in- go to each site and set a cookie domain- with the leading dot.  Set it to cookies/sessions since that was working for you before.  Then- once each masked cp has proper settings, edit config.php to remove those overrides.  Logout, clear all cookies.  Any difference?

ETA- not at all sure you’ll be able to switch in the masked sites- but each should log you in.  Switching…  I’m not sure.  And if it doesn’t work, I’d flip to sessions only for the backends.  Would just override that one in config- IF you can’t switch and want to.

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 18 August 2008 09:48 AM   [ Ignore ]   [ # 14 ]  
Summer Student
Total Posts:  12
Joined  07-29-2008

I have been experiencing the same login issue, using MSM.  At first I thought it was a problem with my database, so i uninstalled everything and started from scratch but that did not solve the issue.  I noticed that I did not receive an error message when trying to login to the control panel, as the login page would just refresh itself.  So, being that the login page did not throw back an error told me my login credentials were ok. 

I was using Safari, so I popped open Firefox, used the same everything as what I had in Safari and it worked in Firefox, and I was able to login to the control panel.

To fix it, you could either:
1. Switch between two browsers, which worked for me
2. Clear the cookies in your main browser; I did this in Safari and I also cleared the cache and it worked for me as well - this allowed me to continue to use my main browser instead of switching between browsers

Locally, I haven’t had any issues, but only when connecting to a live production server.  It definitely appears to be a cookie issue.

Thanks!

Profile
 
 
Posted: 18 August 2008 10:37 AM   [ Ignore ]   [ # 15 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  25612
Joined  05-20-2002

Glad it’s working ok for you, Andres.  RealityDesign- this ever get squared away for you?

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1743, on December 02, 2009 03:47 PM
Total Registered Members: 120130 Total Logged-in Users: 77
Total Topics: 126275 Total Anonymous Users: 41
Total Replies: 664122 Total Guests: 333
Total Posts: 790397    
Members ( View Memberlist )