Post by andrei_petrov » Mon Jan 24, 2022 7:12 pm

Hi Opencart support,

we have the bug related with the imagecreatefromjpeg function. It occurs randomly on some links, i.e.

https://www.new2.cleverkids.ie/index.ph ... ct_id=1800 and showing the message

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 45056 bytes) in /home/new2cleverkids/public_html/system/library/image.php on line 47

the line 47 is $this->image = imagecreatefromjpeg($file); we use php 7.3.

We have increased php_memory limit as fast as possible but it did not help. It occurs with Plaza and Journal theme and dont related with them.

With Regards,
Andrei.

Newbie

Posts

Joined
Thu May 30, 2019 6:14 am

Post by ADD Creative » Mon Jan 24, 2022 8:10 pm

Try disabling you extensions and modifications one by one, until you eliminate them as being the problem.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by andrei_petrov » Mon Jan 24, 2022 8:16 pm

Okay, buy the way the product image size is 1600x1600 and 2.2Mb

Newbie

Posts

Joined
Thu May 30, 2019 6:14 am

Post by ADD Creative » Mon Jan 24, 2022 9:07 pm

1600 x 1600 x 3 = 7,680,000 bytes. Which is a lot less than the 134,217,728 bytes (128M) you have memory_limit set to. Which suggest the memory is being used else where and the image is just the item pushing it over the limit. Have you tried a smaller image anyway or setting memory_limit higher than 128M (use phpinfo() to check the change).

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 83 guests