The problem with userlevelpermissions and utf8mb4

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
btrade
User
Posts: 357

The problem with userlevelpermissions and utf8mb4

Post by btrade »

Hi,
I have datebase

ENGINE = INNODB
CHARACTER SET utf8mb4
COLLATE utf8mb4_unicode_ci;

If I Creating a Table for Dynamic User Levels - I see the error
Specified key was too long; max key length is 767 bytes

Without it my app has mysql error IN LOGIN PAGE
( ! ) Fatal error: Uncaught exception 'mysqli_sql_exception' with message 'Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='' in J:\home\translator\www\backoffice\ewmysql13.php on line 720


Webmaster
User
Posts: 9427

Post by Webmaster »

btrade wrote:
'Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=''

Try to use utf8_general_ci as your database charset, not utf8mb4_unicode_ci.


btrade
User
Posts: 357

Post by btrade »

Webmaster wrote:
Try to use utf8_general_ci as your database charset, not utf8mb4_unicode_ci.
This is old charset utf8_general_ci and now in userlevelpermissions only.
If I want to change charset to utf8mb4_unicode_c , i have error: Specified key was too long; max key length is 767 bytes.


Webmaster
User
Posts: 9427

Post by Webmaster »

btrade wrote:
This is old charset utf8_general_ci and now in userlevelpermissions only.

Not sure what that means. Did you mean you use different charset for different tables? Please provide complete information.

If I want to change charset to utf8mb4_unicode_ci

Why utf8mb4_unicode_ci?


btrade
User
Posts: 357

Post by btrade »

My old project and datebase was in utf8_general_ci
In a new project I use 20 languages and I need utf8mb4_unicode_ci.

Sorry. The problem is not solved.


sangnandar
User
Posts: 980

Post by sangnandar »

This table use varchar type as key.
Now, you may want to check, each varchar character consume different byte in different charset. Shorten your varchar size will solve your problems.


Post Reply