Archive for the ‘WordPress’ Category

Chinese character display problem

星期五, 4月 7th, 2006

Meet this problem again! One friend told me that his comment in Chinese results to an error display. I made the screen snap of this:

Though my blog is based on pure English, there is still many visitors from China. So I can not and should not ask them to make comments in English. This problem must be solved quickly.

With the help of google again, I find the key command which control the codec of the character display. So if you meet the same problem, here is the easy way.

The file is \wp-includes\wp-db.php. Yes, from the file name we can know it interacts with the dbase (wordpress uses mysql, a great free dbase system).

  • Use any text Editor to open it (notepad from windows can work well).
  • Search and find the string “$this->dbh” (no quotation marks in search).
  • Add a new line under it, with the content: $this->query(”SET NAMES ‘gbk’”);
  • Save it and everythink is ok
  • In fact, the only thing we should do it to make the two sides same: codeing of the dbase, and the decoing of the php command. In my system, they are both GBK.


    ——
    ·本文由 iamcj 原创,采用“CC创作共用”方式共享

    Funny WordPress plugin: AntiFirefox

    星期三, 2月 15th, 2006

    The aim of this strange plugin is too show a crossline of any Firefox, which means changing any Firefox in your article into FirefoxemoticonWhen hearing the name I thought if this plugin will forbid any user to viewing the site by Firefox.

    The author is funny. He want to see if there will be a debate by the fans of Firefox.

    I know a person who is crazy of Firefox and looks down on IE. I use both Firefox and IEemoticon, of which I prefer IE.


    ——
    ·本文由 iamcj 原创,采用“CC创作共用”方式共享

    Wordpress with IIS

    星期三, 2月 15th, 2006

    I have noticed a strange thing of Wordpress: after pressing the Publish button, it takes me about 20 to 30 seconds to view the article. During the 20 seconds or more, no matter I cilck links or refesh pages, the server do not makes and feedbacks.

    I then login the server and want to find where the problem is. By viewing the CPU graph, when the user make a save or publish operation, the server will be busy for over 15 seconds at least. But other sites on this server do not have the same question.

    I think maybe the WordPress system is not very compatible with IIS server. For the Windows server platform, ASP (or ASP.NET) with access(or MSSQL) will be the better solution. Of course we all know the best choice for php+mysql site is linux or freebsd, but there is still many application I must put them running under windows, like tencent RTX. So I installed AppServ, the integration software of apache, mysql, php and phpmyadmin. Then I moved the WordPress site from IIS to apache.

    Now what is the result? emoticon Everything can not be better.


    ——
    ·本文由 iamcj 原创,采用“CC创作共用”方式共享