News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Re: Session verification failed. Please try logging out and back in again

Started by GigaWatt, February 26, 2018, 06:35:15 PM

Previous topic - Next topic

GigaWatt

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?"..."

shnazzle

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.


GigaWatt

"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?"..."


GigaWatt

"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?"..."


Doug Heffernan

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?

Illori

well it has to match that value as that is where it gets it from...

GigaWatt

Quote from: doug_ips on March 01, 2018, 05:15:24 AM
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?"..."

Aleksi "Lex" Kilpinen

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.
Slava
Ukraini!
"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


How you can help SMF

shnazzle

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.

Advertisement: