kartik-v / yii2-dynagrid

Turbo charge the Yii 2 GridView with personalized columns, page size, and themes.
http://demos.krajee.com/dynagrid
Other
74 stars 66 forks source link

SALT_SESS_KEY problem with generateRandomKey() #165

Closed metola closed 7 years ago

metola commented 7 years ago

Hi Kartik, When I update to 1.4.6 (under development), I find a error in my code. In Module.php you add contant SALT_SESS_KEY that feed with $app->security->generateRandomKey() and this is the problem because I change my session to db and I have a problem when try update table:

Exception (Database Exception) 'yii\db\Exception' with message 'SQLSTATE[IMSSP]: An error occurred translating string for input param 1 to UCS-2: No mapping for the Unicode character exists in the target multi-byte code page.

How is the best solution for fix this? If change generateRandomKey() for generateRandomString this run good, but I not belive that is the best solution. I think that change collation db, but this is not the problem, because if I copy and paste query in management sql, this run correctly.

This happen because I use sqlsrv.

kartik-v commented 7 years ago

Will update over this with a simplified solution.

metola commented 7 years ago

Thanks