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
PHP Namespace with Dynamic Class Name
How to Pass Parameters by Reference Using Call_User_Func_Array()
Should I Use Prepared Statements for MySQL in PHP Performance-Wise
Inserting Google Calendar Entries with Service Account
PHP - Plus Sign with Get Query
How to Fix the "Base Table or View Not Found: 1146" Error When Running 'PHP Artisan Migrate' Command
PHP Header Redirect in a New Window
Notice: Undefined Offset: 0 In
How to Automatically Detect User's Timezone
Multiple Index Variables in PHP Foreach Loop
MySQL Performance - "In" Clause VS. Equals (=) for a Single Value
PHP Date() in Foreign Languages - E.G. Mar 25 Aoû 09
Mysqli Binding Params Using Call_User_Func_Array
Intermittent PHP Abstract Class Error
Variable Position in Comparision in PHP
Error 403 in Loading Resources Like CSS and Js in My Index.Php