Answer the question
In order to leave comments, you need to log in
How to solve out of memory error in Joomla?
Hello. I have an image upload plugin jw_sigpro
Added photos and pages started crashing with 500 error.
Logs:
Allowed memory size of 52428800 bytes exhausted (tried to allocate 13056 bytes) in /var/www/site/data/www/site/plugins/content/jw_sigpro/jw_sigpro/includes/helper.php on line 266
switch($type)
{
case 1 :
$source = @ imagecreatefromgif($original);
if (!$source)
{
JError::raiseNotice('', JText::_('JW_SIGP_LABELS_06'));
return;
}
break;
case 2 :
$source = imagecreatefromjpeg($original); ----266 строка
break;
case 3 :
$source = imagecreatefrompng($original);
break;
default :
$source = NULL;
}
// Bail out if the image resource is not OK
if (!$source)
{
JError::raiseNotice('', JText::_('JW_SIGP_LABELS_07'));
return;
}
Answer the question
In order to leave comments, you need to log in
Photo manipulation is a resource-intensive task. So either add RAM to the hosting or change the driver used. For example, if GD is used, you can change to Imagick and win decently.
You can also refuse to resize photos or set a limit on the size of uploaded photos. But you have 50mb - this is not enough, joomla itself eats a lot, and then there's resize and everything is 50mb.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question