joomla 3.5.1, virtuemart 3.0.17.2, when enable !j debug mode get error. How to fix it ? i have vps server centos
Fatal error: Allowed memory size of 272629760 bytes exhausted (tried to allocate 284095 bytes) in /plugins/system/debug/debug.php on line 1213
You can only try to increase it - check with host .. but joomla debug can use a huge amount of memory on a busy page
265MB is "adequate" in most circumstances
obviously hasn't worked -> Fatal error: Allowed memory size of 272629760 bytes exhausted
whether u can raise the limit depends on what your host allows
Base code to include a module
(this can be used at any file, any time ...)
<?php
//MODULE_POSITION is the module position to render
$modules = JModuleHelper::getModules("MODULE_POSITION");
$attribs = array('style => 'xhtml')
if(count($modules) > 0) { ?>
<div>
<?php foreach($modules as $module) echo JModuleHelper::renderModule($module, $attribs); ?>
</div>
<?php } ?>
more in Joomla doc : https://docs.joomla.org/JModuleHelper/getModules
or
$module = JModuleHelper::getModule( 'mod_login' );
$registry = new JRegistry();
$params = $registry->loadString($module->params);
echo JModuleHelper::renderModule($module, $params );