Page 1 of 1

Memory Error Problem

Posted: Thu Aug 28, 2008 4:03 am
by TTT_Travis
Hi, my site is giving me an error 500 when I switch to normal PHP mode (instead of Fast CGI)

No php.ini files, no .htaccess files, I add a php.ini file with a huge memory limit and use phpinfo to check  that it worked, but I get the same error. I have like 5 other cmsms installs on the same server that work fine.


]# php index.php
X-Powered-By: PHP/5.2.6
Set-Cookie: CMSSESSID9eb8d63e=c150feb76866103825ed5a413151746a; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-type: text/html



Fatal error:  Allowed memory size of 262144 bytes exhausted (tried to allocate 7680 bytes) in /home/techloop/public_html/glenhillsgolf/lib/smarty/Smarty.class.php on line 902

Re: Memory Error Problem

Posted: Thu Aug 28, 2008 4:41 am
by baresi
More info on versions would be more helpful but that memory size can't be right
32M (~32000000) is easily needed, sometimes even more in my experience and depending on modules, etc

One possible method is adding this line near the top of your config.php
ini_set("memory_limit", "32M");

Re: Memory Error Problem

Posted: Thu Aug 28, 2008 7:15 am
by alby
baresi wrote: More info on versions would be more helpful but that memory size can't be right
32M (~32000000) is easily needed, sometimes even more in my experience and depending on modules, etc

One possible method is adding this line near the top of your config.php
ini_set("memory_limit", "32M");
***  For Info  ***
from 1.4+ there is a new config option for memory.
$config['php_memory_limit'] = '';

Look in config.php and add:
$config['php_memory_limit'] = '32M';

Alby

Re: Memory Error Problem

Posted: Thu Aug 28, 2008 7:37 am
by baresi
Thanx alby, don't ask how I missed that  :D