Accentuating problems on the most up-to-date server

Asked

Viewed 701 times

2

I have 2 servers with the following settings:

Server 1:

PHP 5.3.10
Apache 2.2.22
Mysql 5.5.43
Ubuntu 12.04.5 LTS

Server 2:

PHP 5.6.9
Apache 2.4.7
Mysql 5.5.43
Ubuntu 14.04.2 LTS

I’m using the Yii framework.

The problem is that on server 1 the word "dog" appears normally, on server 2 appears "dog".

Server 2 is a copy of server 1 but we changed Apache/PHP/OS.

What could be the source of the problem? The OS version?

  • 1

    Take a look at the default_charset inside php.ini of the two servers and see if the two are the same.

  • @rdehnhardt yes, it’s the same. We changed it because by default the value for PHP 5.3 is different from PHP 5.5.

1 answer

0

Assuming you are using Yii version 2.x, check the database configuration file (config/db.php) if the charset is set to utf-8:

return [
   'class' => 'yii\db\Connection',
   'dsn' => 'mysql:host=localhost;dbname=banco', 
   'username' => 'root', 
   'password' => '', 
   'charset' => 'utf8',
];

Also check the layout file or views, if the UTF-8 charset is set.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.