Php: Settings Memory_Limits > 1024M Does Not Work

ini_set(memory_limit) in PHP 5.3.3 is not working at all

Most likely your sushosin updated, which changed the default of suhosin.memory_limit from disabled to 0 (which won't allow any updates to memory_limit).

On Debian, change /etc/php5/conf.d/suhosin.ini

;suhosin.memory_limit = 0

to

suhosin.memory_limit = 2G

Or whichever value you are comfortable with. You can find the changelog of Sushosin at http://www.hardened-php.net/hphp/changelog.html, which says:

Changed the way the memory_limit protection is implemented

PHP: Does ini_set(memory_limit,1024M); implicitly relase memory resources on PHP script execution end?

ini_set

Sets the value of the given configuration option. The configuration option will keep this new value during the script's execution, and will be restored at the script's ending.

Need to say anything more? Yes one thing! Garbage collection has nothing to do with the ini_set calls that you have. Both are 2 different things.

How to increase memory limit for PHP over 2GB?

Have you tried using the value in MB ?

php_value memory_limit 2048M

Also try editing this value in php.ini not Apache.



Related Topics



Leave a reply



Submit