wordpress 2.0.6导致feedburner停工

# 本文来自煎蛋(http://jandan.net/),作者为skyreal

feedburner wordpress rss feed xml php

[pic via]

在升级到wordpress 2.0.6之后,你的feedburner有可能会给出“invalid xml”(无效的xml)信息,并导致你的feed无法工作。
解决方法:

打开/wp-includes/functions.php 并查找如下代码:
if ( substr(php_sapi_name(), 0, 3) == ‘cgi’ )
@header("HTTP/1.1 $header $text");
else
@header("Status: $header $text");
}


把上面的代码替换成:


// if ( substr(php_sapi_name(), 0, 3) == ‘cgi’ )

@header("HTTP/1.1 $header $text");

// else

// @header("Status: $header $text");

}


另外一种简单的解决方法:
创建一个叫做FeedBurner.php的文件并加入如下代码:

$uri="http://neosmart.net/blog/feed/"; //Replace this URI with the URI to *your* feed!!

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $uri);

curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);

echo curl_exec($ch);

$status = curl_close($ch);

?>
然后去feedburnner把feed指向你刚创建的那个FeedBurner.php。



链接 | 来源

垦一垦

 关于 “wordpress 2.0.6导致feedburner停工”有 6 篇评论

  1. 1 David Pan 说 : Reply to this comment
    2007-01-07 5:02 pm

    我的论坛没有发现这个问题。

  2. 2 skyreal 说 : Reply to this comment
    2007-01-07 5:12 pm

    呵呵,没有最好,小心为妙。

  3. 3 barry 说 : Reply to this comment
    2007-01-08 9:14 am

    从一个开发wp的blog上看到的
    Note that this doesn’t prevent FeedBurner (or anyone else) from fetching your feed 100% of the time. The issue only arises with certain RSS consumers and only on certain servers, and only when the feed attempts to return a 304 Not Modified header. So with FeedBurner, for instance, one fetch attempt may trigger it, but the next will be fine.

    http://anonymouse.org/cgi-bin/anon-www.cgi/http://markjaquith.wordpress.com/2007/01/06/wordpress-206-feedburner-issue-and-fix/
    我好象也没有这个问题,但是还是下载了为秒(作者blog上提供了新的function页面)

  4. 4 maple 说 : Reply to this comment
    2007-01-09 11:19 pm

    我草!终于上来一次,留言纪念~~

  5. 5 sein 说 : Reply to this comment
    2007-01-09 11:23 pm

    哈哈,终于见到maple了~

  6. 6 煎蛋 » 煎蛋里的全文翻译 说 : Reply to this comment
    2007-01-10 7:49 pm

    [...] 之前漏掉一篇:男人XX时易犯的50个错误 [yonnie+elfox / 1303字] 新发现的[不断更新]: 24- 2006世界建筑奇观 [ant / 769字] 25- 2006年Top 25 Webcams [ant / 497字] 26- 工作时间狂览digg [蛋挞 / 562字] 27- Google,免费代理服务器 [sfufoet / 806字] 28- Google 2006 年的12 个代表性图片 [ant / 414字] 29- 2007 Google 猜想 [sein / 750字] 30- 2006年最佳的20个科技创新产品 [ant / 1639字] 31- 美国10大危险职业 [ant / 717字] 32- 健身馆不会告诉你的10件事 [yonnie / 495字] 33- 13位摄影师改变你眼中的世界 [ant / 2172字] 34- 人权受限?聋哑学生导盲犬严禁入校 [蛋挞 / 376字] 35- 彻底删除硬盘数据 [zuofei / 389字] 36- wordpress 2.0.6导致feedburner停工 [skyreal / 864字] 37- 1952 年的电脑广告 [sein / 376字] 38- 不喜欢 iPhone 的十个理由 [sfufoet+ning / 915字] 39- 无国界医生组织公布2006年top10人道危机漏报 [ant / 461字] [...]

想说点什么吗?