Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 49152 bytes) in /ck.przemysl.pl/libraries/ic_library/Thumb/Create.php on line 85
Error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 49152 bytes) (500 Whoops, looks like something went wrong.)

OutOfMemoryError

HTTP 500 Whoops, looks like something went wrong.

Error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 49152 bytes)

Exception

Symfony\Component\ErrorHandler\Error\ OutOfMemoryError

Show exception properties
Symfony\Component\ErrorHandler\Error\OutOfMemoryError {#6118
  -error: array:4 [
    "type" => 1
    "message" => "Allowed memory size of 536870912 bytes exhausted (tried to allocate 49152 bytes)"
    "file" => "/ck.przemysl.pl/libraries/ic_library/Thumb/Create.php"
    "line" => 85
  ]
}
  1. if (preg_match("/.jpg/i", "$source_image") || preg_match("/.jpeg/i", "$source_image"))
  2. {
  3. // JPEG type thumbnail
  4. $destImage = imagecreatetruecolor($width, $height);
  5. $sourceImage = imagecreatefromjpeg($source_image);
  6. imagecopyresampled($destImage, $sourceImage, 0, 0, $x, 0, $width, $height, $w, $h);
  7. imagejpeg($destImage, $destination_image_url, $quality);
  8. imagedestroy($destImage);
  9. }

Stack Trace

OutOfMemoryError
Symfony\Component\ErrorHandler\Error\OutOfMemoryError:
Error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 49152 bytes)

  at /ck.przemysl.pl/libraries/ic_library/Thumb/Create.php:85