News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Session verification failed

Started by Tiribulus, April 22, 2013, 12:21:18 PM

Previous topic - Next topic

Tiribulus

#20
Here is the link and yes I can upgrade PHP. It's my server. Suse and I am not the greatest Linux guy, but I can usually fumble along. I've been using Firefox btw.

http://www.tiribulus.net/smf/

It's all messed up. The password doesn't work at all now and the captcha image doesn't show up for registration either. I should probably reinstall it. I have a wordpress blog installed ni that server that works fine btw. If that means anything. They both use LAMP?

According to Suse's online update I already have the latest version of PHP.

Tiribulus

Quote from: K@ on October 08, 2013, 04:17:37 AM
...or spamming. ;)

I've put a little flag in a helpers board, in the hope that someone can help us out, wit this. :)
Just saw this. Thank you sir.

kat

Seems we're all a bit stumped, with this. :(

Illori


Oldiesmann

After a bit of research, I figured out what your problem is.

Your PHP configuration uses sha256 for creating session IDs. This will result in session IDs being 64 characters long. The problem is, SMF currently doesn't support session IDs longer than 32 characters (2.1 will support 64-character session IDs). This results in the session ID getting cut off in the database, so when SMF goes to check the one from PHP with what's in the database, they won't match.

There are two options for fixing this, depending on your preferences.

Option 1: Edit your php.ini file to have "session.hash_function = 0" instead of "session.hash_function = sha256". This will cause PHP to use md5 for session IDs, which will result in a standard 32-character session ID.

Option 2: Run these queries in phpMyAdmin to allow SMF to support longer session IDs.

ALTER TABLE smf_log_errors CHANGE session session char(64) NOT NULL;
ALTER TABLE smf_log_online CHANGE session session char(64) NOT NULL;
ALTER TABLE smf_sessions CHANGE session_id session_id char(64) NOT NULL;


Note that the 2nd option will only fix it for that specific install. If you plan on installing additional instances of SMF elsewhere on the server, you will have to run those queries each time you install SMF.
Michael Eshom
Christian Metal Fans

Colin

"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

kat


Tiribulus

#27
Just saw this again will try what oldiesman suggested which I wouldn't have figured out if I lived to be 10,000 years old. :o

EDIT:... OH the man's a genius!!!! The first option fixed it!!!!!
Thank YOOOOOO and God bless you sir!
You rock.

kat

I think Tiribulus is happy. ;)

YAY!

Tiribulus

Quote from: K@ on October 30, 2013, 03:03:26 PM
I think Tiribulus is happy. ;)

YAY!
It's been a year since I first posted about this. I was about to give up. Thanks everybody else too.  :)

Advertisement: