From df82aabe7b3ee4a802c14df34e8364c838ef4bdb Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Tue, 7 Oct 2014 12:17:42 +0400 Subject: [PATCH] Fixes #5395: added note about session table id column length --- docs/guide/runtime-sessions-cookies.md | 2 +- framework/web/DbSession.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/guide/runtime-sessions-cookies.md b/docs/guide/runtime-sessions-cookies.md index eda136f7a1..d0d28d9208 100644 --- a/docs/guide/runtime-sessions-cookies.md +++ b/docs/guide/runtime-sessions-cookies.md @@ -174,7 +174,7 @@ where 'BLOB' refers to the BLOB-type of your preferred DBMS. Below are the BLOB - PostgreSQL: BYTEA - MSSQL: BLOB - +Note that length of id column should be adjusted if `session.hash_function` is changed in `php.ini`. ### Flash Data diff --git a/framework/web/DbSession.php b/framework/web/DbSession.php index 96fa8b2df6..e4bd7ff836 100644 --- a/framework/web/DbSession.php +++ b/framework/web/DbSession.php @@ -65,6 +65,8 @@ class DbSession extends Session * * When using DbSession in a production server, we recommend you create a DB index for the 'expire' * column in the session table to improve the performance. + * + * Note that length of id column should be adjusted if `session.hash_function` is changed in `php.ini`. */ public $sessionTable = '{{%session}}';