的ini_set('memory_limit的',...)无法正常工作,并返回false;想不通为什么 [英] ini_set('memory_limit', ...) doesn't work and returns false; can't figure out why

查看:1276
本文介绍了的ini_set('memory_limit的',...)无法正常工作,并返回false;想不通为什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ini_set('memory_limit', '128M'); // Returns false; memory_limit unchanged

我是不是能够找到的东西,可能会导致这样的列表。到目前为止,我检查:

I wasn't able to find a list of things that can cause this. So far I checked:


  • 安全模式:禁用

  • disable_functions选项:空

  • php_admin_value:(?有没有办法确切知道)无,我能找到

我跑出的想法! 的ini_set 正常工作与其他参数(如的display_errors)

I ran out of ideas! ini_set works correctly with other parameters (such as "display_errors")

推荐答案

如果它不是PHP版本问题贴已经尝试检查没有什么机器$ P $从提高这一限制pventing你。

If it's not the PHP version problem posted already try checking that there's nothing on the machine preventing your from raising this limit.

如何检查是否安装了Suhosin?

编辑(建立已安装了Suhosin后):

edit (after establishing that Suhosin is installed):

配置详情请看这里:<一href=\"http://www.hardened-php.net/suhosin/configuration.html\">http://www.hardened-php.net/suhosin/configuration.html
我怀疑会在 /etc/php.d / 的文件,您可以编辑增加内存的限制范围。你需要编辑配置变量是:<一href=\"http://www.hardened-php.net/suhosin/configuration.html#suhosin.memory_limit\">suhosin.memory_limit

Config details are here: http://www.hardened-php.net/suhosin/configuration.html I suspect there'll be a file in /etc/php.d/ that you can edit to increase the memory limit bounds. The config variable you need to edit is: suhosin.memory_limit

这篇关于的ini_set('memory_limit的',...)无法正常工作,并返回false;想不通为什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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