[wikka-community] SQL error on first access

Brian Koontz brian at wikkawiki.org
Wed Aug 6 05:02:57 UTC 2014

On Tue, Aug 05, 2014 at 12:29:57PM -0400, Tim Mueller wrote:
> Greetings all,
> I have a fresh install of WikkaWiki 1.3.5 from the tarball downloaded this
> morning.  Everything is fine until after th epost-install maintenance I
> try to access the site, at which time the following error appears:
> >Query failed: INSERT INTO wikka_sessions (sessionid, userid,
> session_start)
> >VALUES('99ldcn31qk33iurorf1tfmkipkh8cdan9cvmsob46602e9flep10', 'ToM', 
> FROM_UNIXTIME(1407250227.76)) (Data too long for column 'sessionid' at
> row 1)

The length of sessionid is 32 bits, which corresponds to the "standard" MD5
hash length of 128 bits.  Apparently, since PHP 5.3 one can specify the
type hash used.  You'll have to make sure your specific PHP installation
uses MD5 hashing for generating the session ID.

>From the PHP docs:

 session.hash_function mixed
    session.hash_function allows you to specify the hash algorithm used to generate the session IDs. '0' means MD5 (128 bits) and '1' means SHA-1 (160 bits).

    Since PHP 5.3.0 it is also possible to specify any of the algorithms provided by the hash extension (if it is available), like sha512 or whirlpool. A complete list of supported algorithms can be obtained with the hash_algos() function. 


Brian Koontz
Wikka Development Team
Systems Support and Random Tasking Dept.

More information about the community mailing list