Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

CDbHttpSession not working with Session ID > 32 characters #2192

Closed
bluezed opened this Issue · 1 comment

2 participants

@bluezed

I've posted the problem I had in the forum here:
www.yiiframework.com/forum/index.php/topic/41207-cdbhttpsession-queryscalar-always-returns-false/page__gopid__196588

Basically my session IDs are longer than the CHAR(32) specified in CDbHttpSession and hence I had problems using it until I figured it out.

The settings responsible in the php.ini appear to be

session.hash_bits_per_character = 5
session.hash_function = sha256

That means using 'autoCreateSessionTable=true' will not work at all in my case as the CHAR(32) is hardcoded in

protected function createSessionTable($db,$tableName)

Also would be good if in the documentation there was a hint about this as this was all new to me since I haven't paid much attention to session ids up until now.

@samdark samdark closed this issue from a commit
@samdark samdark Fixes #2192 3d9918e
@samdark samdark closed this in 3d9918e
@samdark
Owner

Added comments in phpdoc.

@twisted1919 twisted1919 referenced this issue from a commit
@samdark samdark Fixes #2192 db6fb85
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.