Figure-LAMP
In our configurationLAMP, You will often findChinese garbled characters, Still usedFirefoxBrowser, tragedy. There is no way to solve it!
When mysql_test.php or phpmyadmin is enabled in the FireFox browser, if Chinese characters are garbled, the default language setting problem occurs. The solution is as follows:
Open the apache configuration file: udo gedit/etc/apache2/apache2.conf, add: AddDefaultCharset UTF-8 at the end, if still garbled, then switch the UTF-8 to gb2312.
Restart Apache: sudo/etc/init. d/apache2 restart and refresh mysql_test.php.
If you want to manually start mysql: mysql-u root-p, enter the password as prompted.
If the following error occurs when you restart Apache:
* Restarting web server apache2
Apache2: cocould not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
Apache2: cocould not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
Modify the apache configuration file sudo gedit/etc/apache2/apache2.conf and set ServerName 127.0.0.1 at the end of the file.
Through the introduction of the article and my careful analysis, you can find a solution to Chinese Garbled text! Share it with your friends!