News:

Wondering if this will always be free?  See why free is better.

Main Menu

Log in and out session problem on other site.

Started by ral, December 01, 2019, 05:24:42 PM

Previous topic - Next topic

ral

Hi,
I've been a long time user of SMF and have been searching this issue and reading threads but haven't found a solution.

It's down to the ssi_login and ssi_logout session issue that appeared in 2.0.14 (from what I remember) and was supposidly fixed in 2.0.15.

When logging in from my site's forum it's fine www. domain. com/ forum, but when i log in from the form on a page in www. domain. com (using the ssi_login function), and yes SSI.php is included, I get "Session verification failed. Please try logging out and back in again, and then try again.".

When logged in I can see that $context['session_var'] and $context['session_id'] return different values that what is present on the forum logout link.

The forum is a clean install.
I have "Use subdomain independent cookies" on.

Any suggestions?

Arantor


ral


Arantor

Would you be able to post a link so someone can look at it? This is a bit weird (and depending on what you've done, more work may be required)

ral

Which would you like the link to?
The website is www. batman-online. com/index.php

It's currently being built up again.

Arantor

Is that homepage your custom code? Do you happen to run session_start() in it? (If so, please take it out, SMF is making 2 sessions here, which is weird but if you're doing things like manually starting session before SMF gets to it, or even after SSI is loaded, weird things will happen.)

ral

That was the problem. Thank you Arantor!

I've set $_SESSION['login_url'] and $_SESSION['logout_url'] with the same value (https:// www. batman-online .com'.$_SERVER['REQUEST_URI']) - however logging in goes directly the forum whereas loggin out take the user to the correct page.

Anything I'm doing wrong for the logging in?

Arantor

Off hand I can't see why that would be wrong, that's weird.

Advertisement: