Maxi-Pedia Forum

Information Technologies and Systems (IT/IS) => Internet, SEO, HTML, AdSense, How to build a website => Topic started by: atari on October 22, 2008, 05:04:33 pm



Title: Session verification failed. Please try logging out and back in again
Post by: atari on October 22, 2008, 05:04:33 pm
Hello,

When I try to go to administration or write a post in my SMF installation, I get the following error message:

An Error Has Occurred! Session verification failed. Please try logging out and back in again, and then try again.

This started happening out of the blue sky, suddenly, and it is now crippling my website. Anyone has any advice?


Title: Re: Session verification failed. Please try logging out and back in again
Post by: mod on October 22, 2008, 05:19:09 pm
Hello,

I do not know exactly what triggers this message on your end, but the principle is that SMF works with sessions in many ways. It seems to pass them in _GET, _POST, from DATABASE, from COOKIES, etc. If it runs into a situation where your sessiondata in one source is not the same like from the other source, it returns the message. This can happen for example when your hosting provider cleans the sessions temp folder with you logged in. In this case, you would be able to log back in after sessiondata elsewhere expires.

To fix the "Session verification failed. Please try logging out and back in again, and then try again." message:

a) Sessions are stored in your database in the Sessions table (if you have dbase sessions enabled). You can dump this table without problems. In case you decide to manually dump this table, make sure you also delete records from log_online and log_errors. These two tables seem to hold session related data as well (i.e. data related to sessions on your Sessions table).
b) I had some files related to sessions in my temporary folder where I store temp files from my web server. Find out where your server stores temp files and clean that up.
c) Clean up your cookies. Those can store some data related to this.
d) If you are worried about deleting the content of the Sessions table, you can force all sessions to expire by setting the databaseSession_lifetime variable on the Settings table to one.
e) In case you have bad luck, and you can't even log into your admin interface to disable database sessions, you can hack that settings by setting the databaseSession_enable variable to zero in your Settings database table.
f) If nothing helps, you can edit your Security.php file and disable checks related to checking sessions. Find the checkSession() function and uncomment all the stuff that checks for sessions validity.

e) and f) will not fix your problem, but it will at least get you into the system to do more research.



Title: Session verification failed. Please try logging out and back in again
Post by: sunset on February 26, 2009, 03:11:36 pm
I got this message on my local after cleaning up my temp folder. Dumping everything on the sessions table solved my problems. Great guide. Thanks.