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.

Logout/session issues after server move

September 12, 2011 3:33pm

Subscribe [2]
  • #1 / Sep 12, 2011 3:33pm

    carlebanks

    6 posts

    I’m having a strange issue with a site after moving servers from a testing location to a live location.

    I have a logout button:

    {if logged_in}<li><a href="http://{path=LOGOUT}">Logout</a></li>{/if}

    which works fine in the testing location, but after moving to a new server there seems to be an issue with sessions - when you click the logout button you get the generic logout success message but the logout button is still shown.

    If I change the session setting in the control panel from Cookies only to Session Only or Cookie and Session it works which makes me think there is something with the way I’ve moved the website meaning I’ve missed something?

    I used the add-on Reelocate to change all the paths to the new server and the website works fine, but just think I’m missing some cookie or session parameters somewhere, but can’t see where?

    Could anyone help at all?

  • #2 / Sep 13, 2011 12:47am

    Dan Decker

    7338 posts

    Tundra UK,

    Moving servers can be tricky. Utilities like Reelocate can be helpful, but make sure to read through “Moving ExpressionEngine to Another Server” for a rundown of all the places to double check.

    Also check your Cookie Domain setting in Admin-> Security and Privacy-> Cookie Settings and make sure that matches your new server’s domain.

    Cheers,

  • #3 / Sep 13, 2011 8:15am

    carlebanks

    6 posts

    Hi Dan, thanks for your help.

    I’ve been back through the list, checked everything and it’s all set correct which is really bugging?

    As a last resort I decided to re-install EE again, which I did - loaded everything back to the site and then double checked the database to make sure all the paths were correct, which they were so I loaded it back into the DB location and pushed refresh with anticipation.

    I’m afraid no joy still. Is there a server setting or something in PHP I need to check? It’s the only thing stopping me from making my clients site live and he’s getting very agitated I can’t fix this problem

    Has anyone ever experienced this

  • #4 / Sep 13, 2011 11:51pm

    Dan Decker

    7338 posts

    Tundra UK,

    Let me get some clarity on this. When you click the “Logout” link, you are shown the Logout success message, and then when you are redirected the page is not honoring {if logged_in} conditional? Is that correct? What is the result of a page refresh? Are you using template caching on the affected pages?

    Cheers,

  • #5 / Sep 14, 2011 3:48am

    carlebanks

    6 posts

    Hi Dan

    That’s correct, so the logout button works, it then displays the “Successfully logged out” message but then the button is still displayed and I have a redirect on one of the templates if logged in which also acts as though the user is logged in. If I log in the front end using a super admin login it logs me out of the control panel so I know the logout is doing something.

    On that note, I came to find a solutions last night - if I added {member_name} in the top of the template to see what was happening with the logins I could see when I logged out it was acting like the last registered member was logged in and I could see their name. This made me wonder if there is something stored (url-wise) with the member info. I didn’t need them so I removed them all apart from the Super Admin and it fixed the problem!

    Is there any data in the member module that cold cause this? I’m happy it’s working though so I can close the project off

    Thanks for your help.

  • #6 / Sep 15, 2011 12:21am

    Dan Decker

    7338 posts

    Tundra UK,

    That still strikes me as odd, but I’m happy you found a solution! Let us know if you need assistance in the future by starting a new thread.

    Cheers!

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

ExpressionEngine News!

#eecms, #events, #releases