如何搞定Bluehost.com上面wordpress中文版

作者:半瓶墨水   链接:http://www.2maomao.com/blog/wordpress-bluehost-chinese-solve/

不知道什么原因,wordpress在bluehost上面的中文版始终不能显示中文。查了google,似乎有许多道友也一样始终只能用英文。

很久没有联系客服了,大体是中国这边的客服态度一直让人来气,早已忘记还有客服可以请教)
我查了一下,曾经有人因为bluehost.com上面的PHP函数设置问题在联系bluehost.com客服之后搞定了
试试看吧,就在bluehost.com上面帖了一个问题:

Hey,
I am from China, I just made a blog on 2maomao.com by wordpress, but it seems doesn’t work in Chinese language, but the same code works just fine on my local machine(I work on local machine first then upload).

wordpress is based on php+mysql, and the version on bluehost is higher than the requirement as I have checked. But it still don’t work correctly on Chinese language.

wordpress use wp-config.php and zh_CN.mo to configure into Chinese language mode.

I know from here that bluehost have some limits on php which can cause problem when using wordpress: http://wordpress.org/support/topic/35294

Is my blog problem caused by php limits of bluehost? How can I get it work?

过了两天才收到回信:

I am sorry but we can not provide support for third party programs. This is a wordpress bug, I suggest you contact work press about help with their product.

Please be aware that we can not normally provide support for a 3rd party program, however I have seen this issue before with wordpress and it may help you to know this is a bug with their MAGIC1 and MAGIC2 variables in the gettext.php file. You are using a custom install of workpress so I can not say this will solve the issue for sure,but replacing the $MAGIC1 line with:

$MAGIC1 = 2500072158;

and the $MAGIC2 line with:

$MAGIC2 = 3725722773;

may solve this problem for you.

Thank you,
Spencer
BlueHost Support Team

大意是说他们对第三方程序无法提供支持然后建议更改gettext.php中两个MAGIC变量值

去看了一下源码,那段代码的注释中说MAGIC1和MAGIC2是因为PHP5的Bug而存在的,不管了,死马当活马医,做了更改:
$MAGIC1 = 2500072158;
$MAGIC2 = 3725722773;
然后更新了一下网站,居然神奇的搞定了。
从这件事情来看,Bluehost.com的客服还是不错的,随即发了表扬信:D

Update: Bluehost.com上面的PHP是4.3的,这个绕过PHP5 bug的神秘代码估计在PHP4.3上面有问题。
Update 2008年1月18号: 升级到PHP5,改回去就行了

Tags:[tag]bluehost, php5, magic, wordpress, 中文版[/tag]

留下回复