

<?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>Benny @ NET Life &#187; fatal error</title>
	<atom:link href="http://bennywu.net/tag/fatal-error/feed" rel="self" type="application/rss+xml" />
	<link>http://bennywu.net</link>
	<description>-=用文字在网路上记录生活=-</description>
	<lastBuildDate>Sat, 28 Aug 2010 05:35:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<atom:link rel='hub' href='http://bennywu.net/?pushpress=hub'/>
		<item>
		<title>升级到2.8，顺便解决了“Fatal error: Allowed memory size of 33554432 bytes exhausted”错误</title>
		<link>http://bennywu.net/2009/06/23/197</link>
		<comments>http://bennywu.net/2009/06/23/197#comments</comments>
		<pubDate>Tue, 23 Jun 2009 11:07:20 +0000</pubDate>
		<dc:creator>熊爱胖大</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[俺的原创]]></category>
		<category><![CDATA[fatal error]]></category>

		<guid isPermaLink="false">http://bennywu.net/?p=197</guid>
		<description><![CDATA[从抓虾的Feed之一看到WordPress更新到2.8了，据说改进了700+的小错误，就决定将blog升级到2.8。不过按照系统提供的自动升级功能，却遇到了&#8220;Fatal error: Allowed memory size of 33554432 bytes exhausted&#8221;错误。我谷歌了一下，在官网上找到了一些线索，具体如下：



Fatal error: Allowed memory size of 33554432 bytes exhausted If deactivating plugins doesn&#8217;t work try one of these methods for increasing the amount of memory a PHP script may consume

<span class="readmore"><a href="http://bennywu.net/2009/06/23/197" title="升级到2.8，顺便解决了“Fatal error: Allowed memory size of 33554432 bytes exhausted”错误">阅读全文——共1072字</a></span>]]></description>
			<content:encoded><![CDATA[<p>从抓虾的Feed之一看到<a href="http://bennywu.net/tag/wordpress" class="st_tag internal_tag" rel="tag" title="Posts tagged with wordpress">WordPress</a>更新到2.8了，据说改进了700+的小错误，就决定将blog升级到2.8。不过按照系统提供的自动升级功能，却遇到了&ldquo;<a href="http://bennywu.net/tag/fatal-error" class="st_tag internal_tag" rel="tag" title="Posts tagged with fatal error">Fatal error</a>: Allowed memory size of 33554432 bytes exhausted&rdquo;错误。我谷歌了一下，在官网上找到了一些线索，具体如下：</p>
<blockquote>
<p><strong><a href="http://bennywu.net/tag/fatal-error" class="st_tag internal_tag" rel="tag" title="Posts tagged with fatal error">Fatal error</a>: Allowed memory size of 33554432 bytes exhausted</strong> If deactivating plugins doesn&#8217;t work try one of these methods for increasing the amount of memory a PHP script may consume</p>
<p>1. If you have access to your PHP.ini file, change the line in PHP.ini If your line shows 32M try 64M: <code><span style="font-family: Consolas;">memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)</span></code></p>
<p>2. If you don&#8217;t have access to PHP.ini try adding this to an .htaccess file: <code><span style="font-family: Consolas;">php_value memory_limit 64M</span></code></p>
<p>3. Try adding this line to your wp-config.php file: Increasing memory allocated to PHP <code><span style="font-family: Consolas;">define('WP_MEMORY_LIMIT', '64M');</span></code>  4. Talk to your host.</p>
</blockquote>
<p>我先尝试停用了所有的插件，果然系统能顺利升级到2.8，但是之后却不能激活插件。于是我修改了wp-config.php，这次所有的问题都解决了。至于2.8有什么好处，我慢慢体会吧。</p>
<p>另外还有一些比较简单的方法也可以尝试一下：</p>
<blockquote>
<p>&nbsp;</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">方法一：</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 30px; ">1、打开网站文件wp-settings.php，找到下面这段代码</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 60px; ">&nbsp;</p>
<div class="wp_syntax" style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; overflow-x: auto; overflow-y: hidden; width: 533px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(241, 245, 246); background-position: initial initial; background-repeat: initial initial; ">
<table style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-collapse: collapse; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(241, 245, 246); border-width: initial; border-color: initial; border-width: initial; border-color: initial; background-position: initial initial; background-repeat: initial initial; ">
<tbody style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
<tr style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
<td class="line_numbers" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 2px; padding-right: 4px; padding-bottom: 2px; padding-left: 4px; vertical-align: middle; border-top-style: none; border-right-style: solid; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; text-align: right; overflow-x: visible; overflow-y: visible; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(225, 231, 233); border-style: initial; border-width: initial; border-color: initial; border-right-width: 1px; border-right-color: rgb(176, 190, 199); background-position: initial initial; background-repeat: initial initial; ">
<pre style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-top-color: rgb(176, 190, 199); border-right-color: rgb(176, 190, 199); border-bottom-color: rgb(176, 190, 199); border-left-color: rgb(176, 190, 199); color: rgb(102, 102, 102); overflow-x: visible; overflow-y: visible; border-width: initial; border-color: initial; width: auto; float: none; clear: none; font-size: 12px; line-height: 1.333; background-position: initial initial; background-repeat: initial initial; ">
1
2
</pre>
</td>
<td class="code" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 2px; padding-right: 4px; padding-bottom: 2px; padding-left: 4px; vertical-align: middle; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(51, 51, 51); border-style: initial; text-align: left; border-width: initial; border-color: initial; ">
<pre class="php" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-top-color: rgb(176, 190, 199); border-right-color: rgb(176, 190, 199); border-bottom-color: rgb(176, 190, 199); border-left-color: rgb(176, 190, 199); color: rgb(102, 102, 102); overflow-x: visible; overflow-y: visible; border-width: initial; border-color: initial; width: auto; float: none; clear: none; font-size: 12px; line-height: 1.333; font-family: monospace; background-position: initial initial; background-repeat: initial initial; ">
   <span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(177, 177, 0); ">if</span> <span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 153, 0); ">(</span> <span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(51, 153, 51); ">!</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(153, 0, 0); ">defined</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 153, 0); ">(</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); ">'WP_MEMORY_LIMIT'</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 153, 0); ">)</span> <span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 153, 0); ">)</span>
&nbsp;    <span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(153, 0, 0); ">define</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 153, 0); ">(</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); ">'WP_MEMORY_LIMIT'</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(51, 153, 51); ">,</span> <span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); ">'32M'</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 153, 0); ">)</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(51, 153, 51); ">;</span></pre>
</td>
</tr>
</tbody>
</table>
</div>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 30px; ">2、将WP_MEMORY_LIMIT的值改为64M或128M</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">方法二：</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 30px; ">如果你主机控制面板是cpanel，可以使用下面这个方法</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 30px; ">1、在cpanel面板选择php Config，选择PHP5(Single php.ini) 单击保存</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 30px; ">2、进入File Manager，进入public_html，找到php.ini,修改 memory_limit = 32M 为 memory_limit = 128M</p>
<p>&nbsp;</p>
</blockquote>

	<h4>你可能也会对这些文章感兴趣：</h4>
	<ul class="st-related-posts">
	<li><a href="http://bennywu.net/2009/07/04/233" title="十个实用的WordPress自定义字段技巧 (2009年07月4日)">十个实用的WordPress自定义字段技巧</a> (0)</li>
	<li><a href="http://bennywu.net/2009/07/04/230" title="WordPress自定义字段的使用心得 (2009年07月4日)">WordPress自定义字段的使用心得</a> (0)</li>
	<li><a href="http://bennywu.net/2009/07/04/227" title="WordPress 自定义字段 (2009年07月4日)">WordPress 自定义字段</a> (0)</li>
	<li><a href="http://bennywu.net/2009/07/02/225" title="打造更为强健的 WordPress 导航栏 (2009年07月2日)">打造更为强健的 WordPress 导航栏</a> (0)</li>
	<li><a href="http://bennywu.net/2009/07/02/220" title="WordPress模板制作常用函数和代码 (2009年07月2日)">WordPress模板制作常用函数和代码</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://bennywu.net/2009/06/23/197/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
