Post by ehsancapri » Sat Jul 22, 2017 2:30 am

I'm using opencart 2.3.0.2 and I know many people have seen this issue before.I've never had this issue until yesterday, when i was adding new product and edit its image.
( I didn't install any extension last 2 month)

Code: Select all

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 29292 bytes) in /home/aapaa/public_html/system/library/image.php on line 26
But all of the fixes that have been suggested have not worked so far:
• Change memory limit in php.ini ( root and admin folder)
• Change memory limit in my cpanel 128 to 256
• I spoke to my webhost technician and they changed my memory limit 128 to 256
• I added a line in .htaccess
• Removed all image files bigger than 450 kb.((((all my pictures are less than 40kb.
300x300 Pixel - 72 DPI & save for web- RGB and 8bit.))))
• I restart my php server!
and .....
--------
and as I know 128M is enough for opencart so, why I need more than 256?something wrong?
I will really appreciate it if you can help me.
Last edited by straightlight on Fri Mar 13, 2020 12:15 pm, edited 2 times in total.
Reason: Added code tags. Removed invalid links.

Newbie

Posts

Joined
Sat Jul 22, 2017 2:26 am

Post by artcore » Sat Jul 22, 2017 5:09 am

Try to lessen the dimensions and or bitdepth. The size is not only affecting the amount of memory needed to process the image.

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by ehsancapri » Sat Jul 22, 2017 7:04 am

I did. all my pictures are less than 40kb.
300x300 Pixel - 72 DPI & save for web- RGB and 8bit.

Newbie

Posts

Joined
Sat Jul 22, 2017 2:26 am

Post by webcorvo » Mon Jul 24, 2017 7:06 pm

you have already fix the problem?

Opencart Developer - For custom work and support contact @ webcorvo@gmail.com


User avatar
Active Member

Posts

Joined
Mon Mar 20, 2017 11:42 pm
Location - Lisbon, Portugal

Post by ehsancapri » Tue Jul 25, 2017 2:47 am

webcorvo wrote:
Mon Jul 24, 2017 7:06 pm
you have already fix the problem?
Not Yet! Do you have any idea?

Newbie

Posts

Joined
Sat Jul 22, 2017 2:26 am

Post by ehsancapri » Thu Jul 27, 2017 3:30 am

Nobody knows a solution? :-[

Newbie

Posts

Joined
Sat Jul 22, 2017 2:26 am

Post by webcorvo » Fri Jul 28, 2017 1:21 am

try to install a new OC in a test folder

Opencart Developer - For custom work and support contact @ webcorvo@gmail.com


User avatar
Active Member

Posts

Joined
Mon Mar 20, 2017 11:42 pm
Location - Lisbon, Portugal

Post by ehsancapri » Mon Jul 31, 2017 1:01 am

webcorvo wrote:
Fri Jul 28, 2017 1:21 am
try to install a new OC in a test folder
I installed new oc in a folder and it's working good and I don't have any problem!!! So, something wrong with my opencart not my php-memory limit.correct?
any suggestion?

Newbie

Posts

Joined
Sat Jul 22, 2017 2:26 am

Post by IP_CAM » Mon Jul 31, 2017 6:07 am

Well, by use of GTMetrix.com, a 20product Category Page Load can easy result in short term
Load Use of 200+MBytes, I would have tried 512MB, then, one never run's into a Memory
Problem. But this depends on the Hosting Agreement, and one should try, to use the max.
allowed Server Memory anyway, if one cares for a speedy Shop, when it comes to multiple
Visitors, browsing at the same time.

But I guess, that the Site ROOT Section may be 'controlled' by .htaccess settings, thereby
possibly disabling, what OC requires and asks for.
But it's only an idea - STILL, to have a SHOP running in the ROOT - Section means, NOT to have
anything else on that Site, exept for OC-Shops, to make sure. For Pro's, at least. ;)
Good Luck !
Ernie

Please don't send me OC Forum Personal Messages, just contact: jti@jacob.ch
---
OC 1.5.6.5 LIGHT Test Site: http://www.bigmax.ch/shop/
OC 1.5.6.5 V-PRO Test Site: http://www.openshop.li/shop/
My Github OC Site: https://github.com/IP-CAM
2'600+ FREE OC Extensions on the World's largest Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by mbeffa » Wed Mar 11, 2020 10:21 pm

I moved OC to a new server and got the same message.
I solved it by changing one line in /php.ini to
memory_limit = 1G

Newbie

Posts

Joined
Thu Jan 02, 2020 6:53 am

Post by victorj » Fri Mar 13, 2020 5:52 am

Latest cpanel is not using php.ini anymore.
its replaced but a file called .user.ini so if you want to make changes to php edit .user.ini file
Php mem limit is a limit for each php execution, so 256mb is more than enough, unless it need more memory when resizing fotos.
if your page has 20 products, it will use up to 20 times 256mb, so set php mem limit as low as possible to avoid running out of total memory.
note after loading of the page memory is available agian for next page load.

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Alle niet stekplichtige onderdelen zoals scharnieren, sloten, randverwarming en verlichting voor alle typen koelingen en vriezers.
https://koelcel-onderdelen.com


User avatar
Expert Member

Posts

Joined
Sat Jun 25, 2011 4:09 am
Location - Alkmaar Holland

Post by JNeuhoff » Fri Mar 13, 2020 6:02 pm

A memory_limit of 1G is way too high, something else must be wrong on your Opencart server. What's the URL of your website? Do you have any 3rd party extensions installed on your server?

Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Rich Snippets * Google Tag Manager * Export/Import Tool * SpamBot Buster * Survey Plus


User avatar
Expert Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am

Who is online

Users browsing this forum: No registered users and 5 guests