增加内存限制时出现奇怪的错误 [英] Strange error on increasing memory limit
问题描述
我正在使用共享托管环境,PHP的默认内存限制为32M.我在使用Concrete5设置时遇到了一些问题.
I am using a shared hosting environment and the default memory limit for PHP is 32M. I am facing some problems with Concrete5 setup.
当我尝试登录Concrete5的管理面板时,它给出了内存限制错误Allowed memory size of 33554432 bytes exhausted
.因此,我将ini_set('memory_limit', '128M')
的内存限制增加到 128M .此后,我得到一个错误消息:
When I try to sign into the admin panel of Concrete5, it gives memory limit error Allowed memory size of 33554432 bytes exhausted
. So I increased the memory limit with ini_set('memory_limit', '128M')
to 128M. After this I get an error that says:
Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without
sending any data.
我尝试将内存限制降低到96M,64M和其他一些值,但是重复相同的错误(ERR_EMPTY_RESPONSE).
I tried lowering the memory limit to 96M, 64M and some other values, but same error (ERR_EMPTY_RESPONSE) repeats.
这是什么错误?为什么在使用ini_set()
时会发生此错误?
What is this error, and why does it occur when I use ini_set()
?
推荐答案
如Joachim Isaksson所评论的那样,旧版本(5.2.14)PHP中存在一个缺陷,导致其终止.我升级了PHP版本,还通过ulimit os调用将默认的memory_limit设置为128M.这样就解决了错误.谢谢大家...:)
As commented by Joachim Isaksson there is a flaw in older version (5.2.14) PHP that causes it to terminate. I upgraded the PHP version, and also increased the default memory_limit set by ulimit os call to 128M. this has resolved the error. Thanks guys... :)
这篇关于增加内存限制时出现奇怪的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!