LAMP configuration strategy: solves the problem of Chinese garbled characters displayed in Firefox

Source: Internet
Author: User

 

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!

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.