[4879] SMF 2.0 Final intermittant login and session failure (and workaround)

Started by rawlogic, August 20, 2011, 07:48:48 PM

Previous topic - Next topic

emanuele

Are you having this problem here? ???
Never seen...

BTW as soon as we'll put SMF 2.1 it will be applied here too! :P


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

kat

Yeah. There's a thread about it in "Site Stuff".

Quote from: emanuele on May 24, 2012, 08:02:52 AMBTW as soon as we'll put SMF 2.1 it will be applied here too! :P


blue thunder

With updating from 2.0 RC3 to 2.0.2 and going to a new hosting provider the problem occured on our site too. I changed the code in load.php but after one week of testing, the problem still resides. Are there more php-files where the code has te be changed?
I set cache to level 1 Any chance that this has to do with it?



emanuele

Technically there could be another problem, but in that case the session would fail always...

Just to be sure, did you change all the three instances of the regular expression present in Load.php?


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

blue thunder

Yes, I found 4 instances of the expression and changed them all.

Meanwhile I deactivated caching level 1. I hope that solves the problem.

For being sure we talk about the same problem. We have some members who get the following error:

"Session-check error. try again." Both with trying to pist a reply or trying to log out.

emanuele

Yeah, seems the same problem.
What version of php are you using?
Would be possible to have the output of phpinfo? (just in case: What is a phpinfo() file?)


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

blue thunder

hxxp:www.banditownersclub.be/phpinfo.php [nonactive]

This is the info. It is a strange problem and not everyone gets it. It depends on operating system and browser version if it occurs or not but I can't find a pattern in it.

Is this (load.php) the only file where a session check is done?




emanuele

I start thinking that the problem could be Suhosin...

You can remove the phpinfo, there is nothing different from mine (where sessions works fine) apart Suhosin, that was present on another one where there is this problem.


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

blue thunder

The problem gets realy weird. When ik hav this session problem and try to reload the page several times, suddenly it works fine!

emanuele

Would you like to help a second?
If you can try this change in Load.php, there are three instances of this:
Code (find) Select
if (preg_match('~^[A-Za-z0-9]{16,32}$~', $session_id) == 0)
return false;

Code (replace with) Select
if (preg_match('~^[A-Za-z0-9]{16,32}$~', $session_id) == 0)
{
log_error('Session check failed - session id: ' . $session_id);
return false;
}

this will log the values of the session value and hopefully will shed some light on why it fails.
So, when you face the issue check the error log, there should be at least a line with that message and please report it here. ;D

If you have already applied the changes suggested in this topic, instead of the one above use this:
Code (find) Select
if (preg_match('~^[A-Za-z0-9,-]{16,32}$~', $session_id) == 0)
return false;

Code (replace with) Select
if (preg_match('~^[A-Za-z0-9,-]{16,32}$~', $session_id) == 0)
{
log_error('Session check failed - session id: ' . $session_id);
return false;
}



Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

blue thunder

Weird... no errors appear in the log.

Tomorow I will try to start from a fresh installation. It is more likely that I have some negative effects from the past upgrades and manual MODs.

Better to start with a clean installation. I will keep you informed about the result.

emanuele

I don't have the code handy, there was another spot I was thinking to ask you to change but I thought these were enough...
Later. :)


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

blue thunder

In the mean time, I have been testing some things and found a patern. When the session check error occurs, I need to refresh 3 times and the requested page is loading without problems. Looks like the error comes with every instance the session is checked.

blue thunder

Aaargggh. Hit me! That stupid theme was making the forum going wild. Ste everyone on the standard theme and the problem was solved... Stupid me  ::)

JJHayesIII

This fix worked for me as well - thanks so much for posting!  I have been having the "Session verification failed" error for quite some time now, and have tried every OTHER fix imaginable, but this solved the problem straight away - don't know why it took me so long to find the topic...

I'm on a shared host (Dreamhost):
PHP Version 5.3.13
session.hash_bits_per_character = 6

SMF Version 2.0.2

ricland

Does anything work?

Fresh install too.


Simply can't log in.

Why isn't there a fix yet?

emanuele

Did you try that one?
Is not sure your issue would be fixed by this.
If you cannot login at all is most likely something related to the server configuration (at least that's what I've seen in the past).


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

ricland

Quote from: emanuele on December 11, 2012, 06:55:08 PM
Did you try that one?
Is not sure your issue would be fixed by this.
If you cannot login at all is most likely something related to the server configuration (at least that's what I've seen in the past).

Which one?

I've been using Simple Machine for years. This is the latest version and it's the only one with the problem.

Where is the php.ini file? How do I find it?

emanuele

You don't need to find php.ini, first thing create a phpinfo (What is a phpinfo() file?) and post the link (or PM me if you don't want to have it public).


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Advertisement: