login page redirecting

blindmime
@blindmime
10 years ago
776 posts
I'm having an odd new issue on several of my websites. When I go to http://mydomain.com/user/login it goes to the admin profile page instead. So I can't log in.

I can go to user/signup and then click the create account button without entering any details and while it gives me an error notice, I am also logged in as admin.

I don't know if this is related, but it began occurring after my shared server was down. It's only happening on sites hosted there, but it's not happening on all the sites hosted there. And it's intermittent.

At various intervals I also become logged out and can't access the login again. It also appears to only happen in Chrome which I know most of the jamroom devs don't care for, but there it is.

What might be causing this?

Edit: It happened in iOS today as well.


updated by @blindmime: 10/18/15 09:14:16AM
michael
@michael
10 years ago
7,822 posts
If you go to /user/login while you are logged in, you will be redirected to your profile since there's nothing to do on that page when you are already logged in.

Could that be what your seeing?
blindmime
@blindmime
10 years ago
776 posts
No. If I click the login link, instead of going to user/login it goes to my profile index page, and I am not logged in. I can click the Create Account link which goes to the create account form. I can then just click the submit button without filling in any information and then I am suddenly logged in (still on the create account form page now with an error message).

This is happening on several different jamroom sites, including a brand new jamroom install, on different computers (both mac and pc) . All of them most recent jamroom version updates. I'm only encountering it with sites hosted on a shared Arvixe account. I could be wrong, but I think there's something up with the server.

Do you have any idea what might cause this jamroom behavior? It's like it's losing sessions and I have to kick it to get it to remember. Like we used to do with old TVs. Smack 'em on the side.
michael
@michael
10 years ago
7,822 posts
I've never seen that behaviour before. Does it happen for all users, or do all users get directed to the admin's page?

It would be really weird for each user to be directed to their own home page even if they are not logged in. I can't understand how the redirect would know where to redirect to.
blindmime
@blindmime
10 years ago
776 posts
Yeah, it's weird. Users get redirected to their profile page when they click login, but they're not logged in. They're not able to go to the user/login page.
michael
@michael
10 years ago
7,822 posts
Really? I wasn't expecting that reply, I was expecting all users get sent to a specific profile.

In that case the biggest suspect becomes some external caching mechanism on the server. Maybe cloudflair or other server caching mechanism that is detecting a redirect to a location and storing it for the users.

There is nothing in jamroom that stores a logged out users identity with enough information to take them to their profile when they are not logged in.
blindmime
@blindmime
10 years ago
776 posts
After a lot of back and forth with Arvixe, it turns out you are right, Michael:
Quote:
I apologize for the you have experienced. We have implemented varnish caching which we did notice has resulted in issues with sessions. As a work around you can add the following lines to your .htacess file:

------------
Header set Set-Cookie "VC-NoCache=1; max-age=900; path=/"
Header set VC-NoCache "1"

Can I add this without causing any issues?
michael
@michael
10 years ago
7,822 posts
Those guys know about servers much more than I do, I'd suggest doing what they say. If it doesn't work, Brian is very wise in the ways of servers, so he'll know.

Try it though, I suspect it will sort the issue out.

Well done in your persistence and finally finding it.
blindmime
@blindmime
10 years ago
776 posts
I guess I'm wondering if adding these lines to jamroom's .htaccess file is going to cause any incidental jamroom issues. Or if jamroom updates will overwrite these additions. Or anything like that.
michael
@michael
10 years ago
7,822 posts
jamroom will not over-write the .htaccess . The only way that would happen is if you FTP the .htaccess up to the server from a new install. the marketplace will not touch it.

It doesnt look like any flags that jamroom looks out for. Seams like its just a server setting.

Tags