Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: hchute on October 10, 2013, 08:32:16 PM

Title: "Session verification" errors, "timed out" errors, after upgrade to PHP 5.3
Post by: hchute on October 10, 2013, 08:32:16 PM
I'm running SMF 1.1.18. My hosting service (DreamHost) recently prompted me to upgrade from PHP 5.2 to 5.3. After all the usual backups of software and database, I did so on Monday, and am now at PHP 5.3.13.

Since the upgrade, the following errors are occurring:

- Many users of the forum are getting session verification errors when attempting to log in or log out.
- Those same users are getting "timed out" errors when attempting to post or send PMs. The displayed message is: "Your session timed out while posting. Please try to re-submit your message."

I've Googled this extensively and don't see a clear road for resolving this. Should I downgrade my PHP install back to 5.2?

Forum is http://kboards.com
PHP info is available at http://kboards.com/phpinfo.php
Title: Re: "Session verification" errors, "timed out" errors, after upgrade to PHP 5.3
Post by: Arantor on October 10, 2013, 08:37:44 PM
There is an issue relating to session handling with upgraded PHP installations, where the session bits-per-character value changes and session ids get generated that aren't valid for SMF's checks.

We did not issue a patch for 1.1.x (not entirely sure *why* we didn't) though it is patched in 2.0.

I would note that there are going to be more and more issues in time with SMF 1.1.x and you are strongly advised to make preparations for an SMF 2.0 upgrade in the near future.
Title: Re: "Session verification" errors, "timed out" errors, after upgrade to PHP 5.3
Post by: hchute on October 10, 2013, 08:57:43 PM
Ah, okay. Thank you. Time to get serious with my SMF 2.0 transition planning.

Is there any workaround I can use in the meantime, possibly through a setting?

If not, I suppose I'll downgrade PHP back to 5.2, until I'm ready to make the move to SMF 2.0.
Title: Re: "Session verification" errors, "timed out" errors, after upgrade to PHP 5.3
Post by: Arantor on October 10, 2013, 09:04:14 PM
There's no setting for it in SMF, and it is not recommended to change the PHP setting that affects this which is session.hash_bits_per_character; it works reliably with 4, yours is set to 6.

The fix described for 2.0 may be of use to you, but unfortunately it's been too long since I played with 1.1 to know how useful it will be - http://www.simplemachines.org/community/index.php?topic=447598.msg3397756#msg3397756
Title: Re: "Session verification" errors, "timed out" errors, after upgrade to PHP 5.3
Post by: hchute on October 10, 2013, 09:46:29 PM
Okay, I'll check that out. Many thanks!
Title: Re: "Session verification" errors, "timed out" errors, after upgrade to PHP 5.3
Post by: hchute on October 10, 2013, 10:33:50 PM
Just a follow-up: I left the PHP settings alone, but made the code changes to Load.php. Things seem to be resolved.

Now, on to planning for how to convert my many custom mods to work with SMF 2.0!!

Thank you again for your help in resolving this issue.
Title: Re: "Session verification" errors, "timed out" errors, after upgrade to PHP 5.3
Post by: Arantor on October 10, 2013, 10:35:48 PM
Good to hear it :)

If you need any assistance with the conversion please do shout :)