Possible Duplicate:
ini_set(“memory_limit”) in PHP 5.3.3 is not working at all
I just moved my project to a new server. I set the server up myself (apt-get install apache2 php5 mysql-server was most of that task). My project has a config.php file with the line
ini_set('memory_limit', '1024M');
at the top. That used to work fine, but now it returns false and my script terminates due to lack of memory.
I've verified that safe_mode is off and disable_functions is empty. What other configuration directives can affect ini_set? Why is ini_set still failing?
If it matters:
$ uname -a
Linux drevo 2.6.32-5-amd64 #1 SMP Mon Jan 16 16:22:28 UTC 2012 x86_64 GNU/Linux
$ sudo apache2ctl -v
Server version: Apache/2.2.16 (Debian)
Server built: Sep 29 2011 20:59:05
$ sudo php5 -v
PHP 5.3.3-7+squeeze6 with Suhosin-Patch (cli) (built: Jan 31 2012 10:56:51)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH
'; ini_set('memory_limit', '1024M'); echo ini_get('memory_limit');` probably problem is in your script – cetver Feb 03 '12 at 17:41