Advertisement:

Author Topic: Re: Session verification failed. Please try logging out and back in again  (Read 1543 times)

Offline GigaWatt

  • The Smiley Guy
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,187
  • Gender: Male
    • Macedonian electronics forum
I don't mean to revive old threads, but I had the exact same problem with my forum yesterday. "Session verification failed. Please try logging out and back in again, and then try again." and there were no entries in the error log. I just wanted to point out the circumstances under which SMF threw this error.

I was messing around with index.php, proxy.php... basically, all of the script files in the root. I was trying to make the line endings Windows compatible (CR + LF) and also saved them as UTF-8 instead of ANSI. I didn't thought SMF would mind this (most servers recognize UTF-8 and CR + LF line end/new line), but I was wrong. After I saved them and copied them via FTP (binary mode, not ASCII), while I was logged in, I logged out and couldn't log in afterwards. SMF threw the previously mentioned error.

I just downloaded a fresh copy of the adequate SMF version I had on my forum (in my case 2.0.15) copied all of the files I altered and voila :), everything was working fine ;).

I was just wondering if someone could give an explanation why this happened ???. I thought the script formatting wouldn't matter (most servers are Debian based, CR + LF and UTF-8 in text files was implemented a while ago), so I really couldn't find an explanation to why this happened. Maybe this particular server threw this error (I'm on 1and1, I know, I have to switch to another hosting service ;D) ???. Maybe the fact that I was logged in and logged out after I altered the files was the trigger to this behavior? Maybe the script makes a binary check (CRC) of some it's files during log in and out just to make sure nobody tempered with them?

Any insight on the issue would be appreciated ;).

Just to be clear, I've solved the problem so I don't need help solving it, I'm just curious ;).
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Offline shnazzle

  • Semi-Newbie
  • *
  • Posts: 30
Re: Session verification failed. Please try logging out and back in again
« Reply #1 on: February 28, 2018, 07:33:25 AM »
Not sure if it's related at all but I'm getting rather sick of the session errors.
Either this one posted, or "session expired" or "session timed out" or one of the many others.

Basically the damn thing doesn't seem to be able to hold a session. And if you're like me and log in via multiple devices, you're extra screwed.

I've cleared my web cache, I've cleared the server cache, I'm running 2.0.15 so the necessary code around not reading "," and "-" is in there, I'm running PHP 5.6, so all should be fine.
I've tried almost every code fix I can find on these forums and if anything it's just getting worse. To the point now where I had to just switch to my PC because my phone will no longer do anything on the forum without a session error. Even after a cache clear, shut down, etc.


Offline GigaWatt

  • The Smiley Guy
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,187
  • Gender: Male
    • Macedonian electronics forum
Re: Session verification failed. Please try logging out and back in again
« Reply #2 on: February 28, 2018, 04:18:06 PM »
What's in you error log?
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."


Offline GigaWatt

  • The Smiley Guy
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,187
  • Gender: Male
    • Macedonian electronics forum
Re: Re: Session verification failed. Please try logging out and back in again
« Reply #4 on: February 28, 2018, 09:27:48 PM »
Sure.

"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 52,474
try installing https://custom.simplemachines.org/mods/index.php?mod=4167 and see if it helps your issue.

Offline Doug Heffernan

  • Full Member
  • ***
  • Posts: 567
    • An Unofficial King of Queens Forum
Can you uncheck the Enable local storage of cookies setting and see if it would help?

Another thing, the cookie name, does it match that of $cookiename var in your Settings.php file?

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 52,474
well it has to match that value as that is where it gets it from...

Offline GigaWatt

  • The Smiley Guy
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,187
  • Gender: Male
    • Macedonian electronics forum
Can you uncheck the Enable local storage of cookies setting and see if it would help?

Another thing, the cookie name, does it match that of $cookiename var in your Settings.php file?

Actually... I'm not the one having the problem anymore. If you read the first post in the thread, I just had a question that I hoped someone could answer. shnazzle was the one who still has a problem with his/hers forum... and I had no idea if doug_ips was addresing me or shnazzle in his post, so... I just posted a screen shot :D.

And yes, the cookie name in Settings.php and Settings_bak.php matches the one in the set in Cookies and Sessions. I think this is must, since, I think SMF reads this string from Settings.php. Actually, I had no idea where to set the cookie name, so I poked around in Settings.php and found the cookie name section, changed it in Settings.php and Settings_bak.php and afterwards found the Cookies and Sessions section ;D.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Lead Support Specialist
  • SMF Super Hero
  • *
  • Posts: 18,855
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • There's No Place Like 127.0.0.1
Just to keep things tidy then, I'll mark this topic solved. If shnazzle is still having those issues, I'd advice them to open their own topic.
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.
  Fooling around with an i7 990X @ 3,47Ghz / 12Gb / Win 10 x64 / 3840x2160


How you can help SMF

"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum.
 Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Offline shnazzle

  • Semi-Newbie
  • *
  • Posts: 30
Re: Session verification failed. Please try logging out and back in again
« Reply #10 on: February 22, 2020, 09:55:09 AM »
Just noticed this. Apologies for the very late reply.
But for those on 2.0.15,which I'm guessing is still a fair few, I haven't had this issue since upgrading to 2.1 RC2. I never did get to the bottom of the issue, I tried all sorts. But going to 2.1 has been great so whatever has been implemented in there fixed this.