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

摘自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。

2 Comments are ready?

  1. 学习了,留着备用。

    [回复]

    蓝冰 said on: 2009-11-05 17:17
  2. 确实可以解决问题,但最好还是在服务器级别增加内存限制,32M确实小了一些,64M是个不错的选择。

    [回复]

    少爷 said on: 2009-11-13 08:32

2 Trackbacks

  1. 2009-11-03 : 0blog
  2. 2009-11-03 : 0blog

Post a Comment

Your email is never published nor shared. Required fields are marked *

*

*

Type your comment out:

:wink: :-| :-x :twisted: :) 8-O :( :roll: :-P :oops: :-o :mrgreen: :lol: :idea: :-D :evil: :cry: 8) :arrow: :-? :?: :!: