Page 1 of 1
Home page Error [SOLVED]
Posted: Mon Feb 15, 2010 1:13 pm
by pukka
Hello,
I am creating a new website using CMSMS and it was going well however for some weird reason when i go to the home page, it comes up with the following error
"Fatal error: Allowed memory size of 62914560 bytes exhausted (tried to allocate 40961 bytes) in D:\Websites\webhost\websitename\websitename.com\www\lib\smarty\Smarty.class.php on line 1279"
The homepage displays in a manner that suggests it is not able to read the stylesheet which it is meant to be attached to.
The weird thing is that the home page was working fine previously. Also the error only comes up on the home page. The other pages are working just fine.
Re: Home page Error
Posted: Mon Feb 15, 2010 1:46 pm
by RonnyK
Seems like your memory_limit is too low, although 62M is already high.... Did you install many modules, or even modules that you are not using? As either memory_increase in config.php could be done. Otherwise uninstalling some un-used modules is an option.
Ronny
Re: Home page Error
Posted: Mon Feb 15, 2010 2:07 pm
by pukka
How much should i increase the memory to?
I installed about 6 modules. Is that too much?
Also if the memory is an issue why is it not affecting the other pages on the website. Only the home page seems to be affected. The homepage has the "manage simple slider" module on it. Could that be the problem?
Re: Home page Error
Posted: Mon Feb 15, 2010 2:51 pm
by Rolf
pukka wrote:
How much should i increase the memory to?
Increase it in the config.php file:
Code: Select all
# If you are experiencing propblems with php memory limit errors, then you may
# want to try enabling and/or adjusting this setting.
# Note: Your server may not allow the application to override memory limits.
$config['php_memory_limit'] = '120M';
Regards, Rolf
Re: Home page Error
Posted: Mon Feb 15, 2010 3:20 pm
by pukka
Hello Rolf,
It didn't work.
"Fatal error: Allowed memory size of 125829120 bytes exhausted (tried to allocate 6144 bytes) in D:\Websites\webhost\websitename\websitename.com\www\lib\smarty\Smarty.class.php on line 1283"
The smarty line it refers to contains the following (bit of code is from line 1279 to 1286):
ob_start();
if ($this->_is_compiled($resource_name, $_smarty_compile_path)
|| $this->_compile_resource($resource_name, $_smarty_compile_path))
{
include($_smarty_compile_path);
}
$_smarty_results = ob_get_contents();
ob_end_clean();
Any ideas...
Re: Home page Error
Posted: Mon Feb 15, 2010 3:31 pm
by pukka
It's been fixed now.
Basically there was a content block which contained {content} in the page. Hope that makes sense.
So in the template was a {content} area. Then in the page, the {content} also contained {content}.
Apologies for the daftness.
Thanks for your help Rolf.