解决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。
