解决wordpress无法支持flickr blog及ScribeFire的bug
This is a test post from
, a fancy photo sharing thing.
看到这段话没?
这是Flickr很棒的一个功能,可以一键把照片发布到blog上来;在firefox中也有个很棒的插件,是离线写blog上线后直接一键发布,之前叫做Performancing,现在叫ScribeFire.
我之前一直用ScribeFire的,但是某天我忽然发现不能用了,总是会显示
XML-RPC server accepts POST requests only.
google了半天都没有看到正解。今天在flickr上倒弄blog发布,也不行,提示
The endpoint you entered is not correct.
这次解决的办法给我逮到了,问题出在wordpress blog根目录下的xmlrpc.php文件上,是PHP的一个bug,解决的办法是,修改xmlrpc.php文件,在
< ?php
define('XMLRPC_REQUEST', true);// Some browser-embedded clients send cookies. We don't want them.
$_COOKIE = array();
这一部分的下面,增加这么一段代码:
if (!isset($HTTP_RAW_POST_DATA)){
$HTTP_RAW_POST_DATA = file_get_contents('php://input');
}
经过测试,可以解决flickr blog和Firefox插件ScribeFire遇到的问题。
感谢WordPress › Support 论坛,感谢king_arthur。

February 17th, 2009 at 9:29 pm
[...] 至于‘菊子曰’,个人没有使用过,不做评论,但是如果使用者是近段时间遇到的连接问题,很可能是yo2端的状况,而并非是工具的问题。至少,这几天在yo2讨论区反馈遇到同样问题的人有好些个。而我自己也搜索到了可能的一个解决链接:http://thisiswiki.com/2007/06/flickr-endpoint-xml-rpc/,也把这个发给了Oneoo请教,只是暂时没有得到反馈,希望yo2能够早点对这个问题有个说法。 [...]