utf8 unknown character set

590 views
Skip to first unread message

Muchammad Fikri Izzuddin

unread,
Mar 28, 2017, 1:51:59 AM3/28/17
to Fat-Free Framework

So i just make a CRUD on my local pc, all run smoothly, then i try to upload to webhost then the error just come out.

SQLSTATE[#4200] [1115] Unknown character set: 'utf8;' [/storage/h4/967/1024967/public_html/admin/lib/db/sql.php:496]


Help me to fix this!

Thank You :D

ikkez

unread,
Mar 28, 2017, 4:09:19 AM3/28/17
to Fat-Free Framework
upgrade your MySQL to 5.x

Muchammad Fikri Izzuddin

unread,
Mar 28, 2017, 4:48:48 AM3/28/17
to Fat-Free Framework
i think the version is 5.x 
Screen Shot 2017-03-28 at 3.46.26 PM.png

ved

unread,
Mar 28, 2017, 9:49:28 AM3/28/17
to Fat-Free Framework
You're not even using MySQL at all. You're using MariaDB, a fork of MySQL.

That being said, it should maintain compatibility with MySQL so I'm not really sure what the issue is about.

It has something to do with the following SQL instruction that gets called when initializing PDO by using the "PDO::MYSQL_ATTR_INIT_COMMAND" constant:

SET NAMES utf8;

You can try typing that for yourself on the SQL tab on phpmyadmin and it should give you a similar error.

For some reason, you seem to not have the utf8 encoding available on your database or MariaDB uses some different way to define it.

Not sure if it's a MariaDB configuration issue or not but maybe somebody else here that is using MariaDB and can shed some more light into this.

xfra35

unread,
Mar 29, 2017, 3:36:43 AM3/29/17
to Fat-Free Framework
Looks like the semicolon is interpreted as a part of the character set:
Unknown character set: 'utf8;' 

Muchammad can you try removing it and see if it helps?

In lib/db/sql.php you should replace the line 495 with:

strtolower(str_replace('-','',$fw->get('ENCODING')))];
Reply all
Reply to author
Forward
0 new messages