无法使用ini_set()增加memory_limit [英] Cannot increase memory_limit with ini_set()

查看:180
本文介绍了无法使用ini_set()增加memory_limit的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚注意到,我无法使用 ini_set() .但是,我可以将其设置为该值以下的任何值,并将其增加为ini文件中定义的值以下的任何其他值.

I just noticed that I am unable to increase my memory limit above the value configured in php.ini using ini_set(). I can, however, set it to any value below that and increase it to any other value below the one defined in the ini-file.

有人知道为什么会发生这种情况,或者我该如何解决?

Does anyone know why this happens or how I could fix it?

推荐答案

这很奇怪,根据手册,内存限制可以在任何地方设置.

This is odd, according to the manual the memory limit can be set anywhere.

  • 您是否安装了Suhosin?使用Suhosin,可以施加全局内存限制.

  • Do you have Suhosin installed? With Suhosin, it's possible to impose a global memory limit.

您是否在某处说php_value memory_limit xyz的地方放置了.htaccess文件?

Do you have a .htaccess file lying around somewhere saying php_value memory_limit xyz?

您是否已激活Shell Fork Bomb保护功能?它可以施加全局内存限制.请参见>此处 strong> . (我想这可能是Suhosin的一部分).

Do you have Shell Fork Bomb protection activated? It can impose a global memory limit. See the SO question here. (I suppose this could be part of Suhosin).

关于本地"和全局" memory_limit值,您的phpinfo()说什么?

What does your phpinfo() say concerning "local" and "global" memory_limit values?

如何指定限制,可以发布代码段吗?

How do you specify the limit, can you post a code snippet?

这篇关于无法使用ini_set()增加memory_limit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆