解决Fatal error: Allowed memory size of 33554432 bytes exhausted
2011-08-27 13:13
816 查看
在用wordpress的时候出现了Fatal error: Allowed memory size of 33554432 bytes exhausted的错误,在网上搜索了一下找到很多解决办法,一一列举如下。首先是我测试成功的办法,其实下面几种方法我也试过可惜没有成功。
如果你的空间支持.htaccess ,在.htaccess 文件中添加下面这句话。
2. 如果你有权限进入PHP.ini文件,在该文件中加入下面这句
3. 在文件中添加下面这句
注意上面的路径是在操作系统中的绝对路径。
以上几种方法我都试了,但是只有第1种成功了,其它的都不行,可能这取决于你的空间提供商的设置。另外内存限制也可以加大到最大128M。
在解决上面问题的同时也解决了在使用windows live write往空间写附带图片的日志出现的“从日志服务器接收的对 metaWeblog.newMediaObject 方法的响应无效”的错误。因为我在wordpress后台发文章加入图片是曾出现“Fatal error: Allowed memory size of 33554432 bytes exhausted”的错误,是说创建链接是内存不够,所以解决了内存不够的问题也就解决了我远程发日志的问题了。
如果你的空间支持.htaccess ,在.htaccess 文件中添加下面这句话。
php_value memory_limit 128M ;
2. 如果你有权限进入PHP.ini文件,在该文件中加入下面这句
memory_limit = 64M ;
3. 在文件中添加下面这句
define('WP_MEMORY_LIMIT', '64M');4.也有人说可以自己创建php.ini文件,然后在.htaccess 文件中加入
SetEnv PHPRC /home/host1/public_html/usr1/ (unix path to the directory where php.ini is) (keep the slashes)
注意上面的路径是在操作系统中的绝对路径。
以上几种方法我都试了,但是只有第1种成功了,其它的都不行,可能这取决于你的空间提供商的设置。另外内存限制也可以加大到最大128M。
在解决上面问题的同时也解决了在使用windows live write往空间写附带图片的日志出现的“从日志服务器接收的对 metaWeblog.newMediaObject 方法的响应无效”的错误。因为我在wordpress后台发文章加入图片是曾出现“Fatal error: Allowed memory size of 33554432 bytes exhausted”的错误,是说创建链接是内存不够,所以解决了内存不够的问题也就解决了我远程发日志的问题了。
相关文章推荐
- Php Fatal error: Allowed memory size of 33554432 bytes exhausted 的解决办法
- Php Fatal error: Allowed memory size of 33554432 bytes exhausted 的解决办法
- Php Fatal error: Allowed memory size of 33554432 bytes exhausted 的解决办法
- Fatal error: Allowed memory size of 33554432 bytes exhausted
- magento PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate xxxxx)
- magento -- 出现Fatal error: Allowed memory size of 33554432 bytes exhausted错误的处理
- zencart Fatal error: Allowed memory size of 33554432 bytes exhausted的解决办法
- PHP Fatal error: Allowed memory size of 134217728 bytes exhausted……解决方法
- 问题解决Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 38218371 bytes)
- discuz Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 262144 bytes) 错误解决方法
- Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 2611816 bytes)错误的解决
- Php Fatal error: Allowed memory size of xxx bytes exhausted 的解决办法
- PHP错误Allowed memory size of 67108864 bytes exhausted的3种解决办法
- Fatal error: Allowed memory size of 8388608 bytes exhausted解决方法
- Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 775920 bytes) 问题解决
- Fatal error: Allowed memory size of 8388608 bytes exhausted
- CentOS 6.5 PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted
- 修改 PHP 消耗内存的方法(Allowed memory size of 8388608 bytes exhausted解决方法)
- Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 44 bytes) in
- php内存溢出,出现Allowed memory size of 8388608 bytes exhausted错误的解决办法