D
D
Dmitry2018-03-16 11:06:07
PHP
Dmitry, 2018-03-16 11:06:07

Why, after transferring the site to another hosting, the data from the database is displayed in rhombuses?

Hello. Uploaded site files and MySQL database to hosting. On another free hosting, everything was displayed correctly, but after transferring to another paid hosting, the data that is loaded from the database and displayed on the screen is displayed as black diamonds with a question (Only Russian characters). Page encoding UTF-8, Database tables encoding - utf8_unicode_ci. Tell me, what is the problem and how to fix it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xmoonlight, 2018-03-16
@Joker2705

Check the encoding of the database connection and the encoding of the data inside the tables.
/etc/my.cnf file:

[client]
default-character-set = utf8

[mysqld]
init_connect='SET collation_connection = utf8_unicode_ci'
init_connect='SET NAMES utf8'
character-set-server=utf8
collation-server=utf8_unicode_ci
skip-character-set-client-handshake

Here is the detail.
 

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question