<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>萧渔的博 &#187; WP-Cache</title>
	<atom:link href="http://qianli.me/tag/wp-cache/feed/" rel="self" type="application/rss+xml" />
	<link>http://qianli.me</link>
	<description>thinker，observer，operator</description>
	<lastBuildDate>Fri, 16 Dec 2011 07:51:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Bad Behavior配合WP-Cache的一个小问题</title>
		<link>http://qianli.me/2006/07/a-little-bug-about-bad-behavior-working-with-wp-cache/</link>
		<comments>http://qianli.me/2006/07/a-little-bug-about-bad-behavior-working-with-wp-cache/#comments</comments>
		<pubDate>Sat, 15 Jul 2006 09:34:09 +0000</pubDate>
		<dc:creator>萧渔</dc:creator>
				<category><![CDATA[旧文]]></category>
		<category><![CDATA[antispam]]></category>
		<category><![CDATA[Bad-Behavior]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[WP-Cache]]></category>

		<guid isPermaLink="false">http://www.championeer.ihackr.com/20060715/a-little-bug-about-bad-behavior-working-with-wp-cache/</guid>
		<description><![CDATA[我正在本站点试用Bad Behavior这个反垃圾评论插件（最新版本为2.01），据说效果很好，而且新版本可以和WP-Cache 2协同工作，能够保护被缓存的页面不受攻击，但这需要修改一下WP-Cache 2，Bad Behavior作者给出的方法如下： 编辑wp-content/plugins/wp-cache/wp-cache-phase1.php这个文件，找到下面的语句（大概在第32行） if (! ($meta = unserialize(@file_get_contents($meta_pathname))) ) return; 在这条语句后面添加 require_once( ABSPATH . '/wp-content/plugins/bad-behavior/bad-behavior-generic.php'); 这样就可以让Bad Behavior支持WP-Cache了。但我使用这种方法后，却出现了下面的Fatal Error： Warning: require_once(/home/.digger/championeer/championeer.ihackr.com/wp-content/plugins/bad-behavior/bad-behavior-generic.php) [function.require-once]: failed to open stream: No such file or directory in /home/.digger/championeer/championeer.ihackr.com/wp-content/plugins/wp-cache/wp-cache-phase1.php on line 34 Fatal error: require_once() [function.require]: Failed opening required '/home/.digger/championeer/championeer.ihackr.com/wp-content/plugins/bad-behavior/bad-behavior-generic.php' (include_path='.:/usr/local/php5/lib/php') in /home/.digger/championeer/championeer.ihackr.com/wp-content/plugins/wp-cache/wp-cache-phase1.php on line 34 错误在于找不到bad-behavior-generic.php这个文件，也就是问题出在路径上，由于我使用Dreamhost的虚拟主机服务，它们使用Linux系统，而Linux/Unix系统的文件名都是大小写相关的，我查看了Bad Behavior的插件目录，果然有大写字母，实际为wp-content/plugins/Bad-Behavior/bad-behavior-generic.php，可能插件作者并没有注意到这一点，于是将原语句改为： require_once( [...]]]></description>
			<content:encoded><![CDATA[<p>我正在本站点试用<a href="http://www.homelandstupidity.us/software/bad-behavior/" rel="external">Bad Behavior</a>这个反垃圾评论插件（最新版本为2.01），据说效果很好，而且新版本可以和<a href="http://mnm.uib.es/gallir/wp-cache-2/" rel="external">WP-Cache 2</a>协同工作，能够保护被缓存的页面不受攻击，但这需要修改一下WP-Cache 2，Bad Behavior作者给出的方法如下：<br />
<span id="more-249"></span><br />
编辑wp-content/plugins/wp-cache/wp-cache-phase1.php这个文件，找到下面的语句（大概在第32行）</p>
<pre><code>if (! ($meta = unserialize(@file_get_contents($meta_pathname))) )
        return;</code></pre>
<p>在这条语句后面添加</p>
<pre><code>require_once( ABSPATH . '/wp-content/plugins/bad-behavior/bad-behavior-generic.php');</code></pre>
<p>这样就可以让Bad Behavior支持WP-Cache了。但我使用这种方法后，却出现了下面的<strong><font color="red">Fatal Error</font></strong>：</p>
<pre><code>Warning: require_once(/home/.digger/championeer/championeer.ihackr.com/wp-content/plugins/bad-behavior/bad-behavior-generic.php) [function.require-once]: failed to open stream: <strong>No such file or directory</strong> in /home/.digger/championeer/championeer.ihackr.com/wp-content/plugins/wp-cache/wp-cache-phase1.php on line 34</code></pre>
<pre><code>Fatal error: require_once() [function.require]: Failed opening required '/home/.digger/championeer/championeer.ihackr.com/wp-content/plugins/bad-behavior/bad-behavior-generic.php' (include_path='.:/usr/local/php5/lib/php') in /home/.digger/championeer/championeer.ihackr.com/wp-content/plugins/wp-cache/wp-cache-phase1.php on line 34</code></pre>
<p>错误在于找不到bad-behavior-generic.php这个文件，也就是问题出在路径上，由于我使用Dreamhost的虚拟主机服务，它们使用Linux系统，而Linux/Unix系统的文件名都是大小写相关的，我查看了Bad Behavior的插件目录，果然有大写字母，实际为wp-content/plugins/<font color="red">B</font>ad-<font color="red">B</font>ehavior/bad-behavior-generic.php，可能插件作者并没有注意到这一点，于是将原语句改为：</p>
<pre><code>require_once( ABSPATH . 'wp-content/plugins/Bad-Behavior/bad-behavior-generic.php'); </code></pre>
<p>问题解决。</p>
]]></content:encoded>
			<wfw:commentRss>http://qianli.me/2006/07/a-little-bug-about-bad-behavior-working-with-wp-cache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

