专业WordPress主机提供商

部分美国主机用户遇到内存不足情况解决方法

2009-11-03

摘自hugege博客

现象:


Allowed memory size of 33554432 bytes exhausted (tried to allocate 7680 bytes) in /home2/marine/public_html/wp-includes/kses.php(1030) : runtime-created function on line 1


Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 491520 bytes) in /home2/marine/public_html/wp-includes/class-simplepie.php on line 4134

 

解决方法:

1. 在public_html 目录创建文件 php.ini , 里面添加分割线的内容如下:

—————————-
memory_limit = 64M
—————————-

其它的也是只要从 /home/hugegeor/public_html/复制 php.ini 文件即可

2. 添加下面分割线内容在 .htaccess 文件。

———————————————
suPHP_ConfigPath /home/username/public_html/
———————————————

提示: 用你所在的域名的用户名替换掉 username。

作者:小张 | 分类目录:博客主机 | 标签:

4 条评论

  1. 蓝冰 说道:

    学习了,留着备用。

  2. 少爷 说道:

    确实可以解决问题,但最好还是在服务器级别增加内存限制,32M确实小了一些,64M是个不错的选择。

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>