27chan / bazukachan

Keeping Vichan alive
https://27chan.org
Other
16 stars 4 forks source link

"Illegal mix of collations (ascii_general_ci,IMPLICIT) and (utf8mb3_general_ci,COERCIBLE) for operation '=' while new_ban #27

Closed virtuelles closed 1 year ago

virtuelles commented 1 year ago

The character sets of whitelist's ip is ascii_general_ci, but utf8mb3_general_ci in bans's ipend, maybe this triggered Illegal mix of collations error while new_ban. I tried convert encoding from utf8 to ascii in new_ban, no more errors, maybe the problem is solved? code in bans.php line 619

$converted_range = iconv('UTF-8', 'ASCII//TRANSLIT', $range[0]);
Whitelist::remove_user($converted_range, $uuser_cookie);
// Whitelist::remove_user($range[0], $uuser_cookie);