部分美国主机用户遇到内存不足情况解决方法
摘自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?
学习了,留着备用。
[回复]
确实可以解决问题,但最好还是在服务器级别增加内存限制,32M确实小了一些,64M是个不错的选择。
[回复]
2 Trackbacks