DB session handling fails on default openSUSE 13.1 LAMP installation

Started by TheTekkster, January 21, 2014, 07:15:56 PM

Previous topic - Next topic

TheTekkster

Hi,

on a fresh openSUSE 13.1 system the installation of SMF 2.0.6 fails on/after step 5. Reason for this is the default value in php.ini for session.hash_function. The SUSE PHP package sets this function to sha256. Changing this to 0 (MD5) or deactivating DB session handling on install solves the problem.

I do not know if this is a bug. Anyway, it's interesting to know.

Arantor

This should already have been remedied more permanently in the currently in-development 2.1 series. But yes, in the meantime, setting it to MD5 is the way to go (since file sessions are problematic in some circumstances)
Holder of controversial views, all of which my own.


margarett

I'm not sure on what I'm about to say :P but, IIRC, Oldiesmann posted something about session issues with sha256 by changing some table fields. But the issue was with logins, not with install... So it's probably unrelated, yes.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Arantor

That's pretty much it, yes. The relevant table was made bigger to accommodate larger session hashes.
Holder of controversial views, all of which my own.


TheTekkster

Quote from: Sir Cumber-Patcher on January 21, 2014, 09:07:47 PM
The relevant table was made bigger to accommodate larger session hashes.

Although an extension of the field session_id to 64 characters fixes the fatal error, but the session handling still is not working properly. For example, I can not access the admin center or perform another action in the forum.

Arantor

That's because it's not just the session table that needs adjusting, you also need to adjust log_online which also has a session id in it.
Holder of controversial views, all of which my own.


Shadowwolf_tw

I know im late to the thread by a long while and hate to necro this one but thought it should be posted in case anyone else runs into this issue.

A workaround for this problem is to add the following line to the .htaccess file:

php_value session.hash_function 1

You can also add it to the Apache config file between the <directory> tags

satmanuk

I added that line to my config but I still get this error:

Data too long for column 'session' at row 1
File: /srv/www/htdocs/forum/Sources/Subs.php
Line: 2676

when i try to login..
It says my session token is invalid and i should logout.

Issue seems to be MySQL version in openSUSE 13.1

Server: Localhost via UNIX socket
Server type: MySQL
Server version: 5.6.12 - openSUSE package
Protocol version: 10
User: root@localhost
Server charset: UTF-8 Unicode (utf8)

I installed the exact same tarball on JustHost and it installed without errors.

They are using MySQL version 5.5.37

My friend also installed it on his hosting provider using MariaDB
<Chris> Server-Typ: MariaDB
<Chris> Server Version: 5.5.33a-MariaDB - MariaDB Server

What do I need to do to access the admin account and login/logout?

Could somebody post step by step instructions for SMF 2.0.7 | SMF © 2013, Simple Machines

satmanuk

ok yes this option fixed it.

on a fresh openSUSE 13.1 system the installation of SMF 2.0.6 fails on/after step 5. Reason for this is the default value in php.ini for session.hash_function. The SUSE PHP package sets this function to sha256. Changing this to 0 (MD5) or deactivating DB session handling on install solves the problem.

fyi the fix is the same for 2.0.7.

When will 2.1 be released?

Illori


Advertisement: