Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 2097152 bytes) in /var/www/vhosts/profivetomag.hu/teszt.profivetomag.hu/src/ProductSysWebshopBundle/Classes/ProductSysUtility.php on line 58

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/profivetomag.hu/teszt.profivetomag.hu/src/ProductSysWebshopBundle/Classes/ProductSysUtility.php:58) in /var/www/vhosts/profivetomag.hu/teszt.profivetomag.hu/vendor/symfony/http-foundation/Session/SessionUtils.php on line 52
Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 2097152 bytes) (500 Internal Server Error)

Symfony Exception

OutOfMemoryError

HTTP 500 Internal Server Error

Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 2097152 bytes)

Exception

Symfony\Component\ErrorHandler\Error\ OutOfMemoryError

Show exception properties
Symfony\Component\ErrorHandler\Error\OutOfMemoryError {#1915
  -error: array:4 [
    "type" => 1
    "message" => "Allowed memory size of 134217728 bytes exhausted (tried to allocate 2097152 bytes)"
    "file" => "/var/www/vhosts/profivetomag.hu/teszt.profivetomag.hu/src/ProductSysWebshopBundle/Classes/ProductSysUtility.php"
    "line" => 58
  ]
}
  1. $new_img = \imagecreatetruecolor($new_width, $new_height);
  2. switch (strtolower(substr(strrchr((string)$file_name, '.'), 1))) {
  3. case 'jpg':
  4. case 'jpeg':
  5. $src_img = \imagecreatefromjpeg($file_path);
  6. $write_image = 'imagejpeg';
  7. break;
  8. case 'webp':
  9. $src_img = \imagecreatefromwebp($file_path);
  10. $write_image = 'imagewebp';

Stack Trace

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

  at src/ProductSysWebshopBundle/Classes/ProductSysUtility.php:58