Reputation: 3964
I'm using opencart. In my admin page when I access CATALOG>PRODUCTS
(I have 73 products - Totally I have four pages). When I access my second page it shows this following error
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 4000 bytes) in /home/justborn/public_html/system/library/image.php on line 34
But, I can access first, third and fourth page. I have tried this solution (Allowed memory size of 67108864 bytes exhausted (tried to allocate 4459414 bytes) in writing an xml file) in my .htaccess file
php_value memory_limit 128M
But, it returns 500 Internal error.. How do I solve this Fatal error: Allowed Memory size of 67108864 ?
Upvotes: 1
Views: 18583
Reputation: 107
This is the same problem I faced, "Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 8192 bytes) in opencart system/library/image.php on line 26"
This error appears when we upload large images (1.5 MB+ size), at the time of editing the images Opencart system/library/image.php tries to load those images and in order to load BIG images it needs more memory.
In order solve this there are two ways. 1. For shared hosting users
1.1 Open File Manager from cPanel or FTP to your website 1.2 Go to "public_html/image/catalog" 1.3 Look for Big Images and Download and delete those images from the server.
2.1 In admin folder open php.ini file 2.2 Try to increase from memory_limit = 64M; to memory_limit = 128M; or more as required.
This should solve the problem.
I would personally advice to upload optimized images and use solution 1 that is deleting Big Images, this is not create any load on the server.
Upvotes: 0
Reputation: 458
Check your images size in filemanager: there might be some big sized images.
I had 2.9MB size of picture which created such trouble to me.
Now, after reducing the size I've solved it.
Upvotes: 2
Reputation: 193
you have to change the php.ini file on line 18 memory_limit = 64M; to 64 x 2 = 124 or 64 x 4 = 256 but wait ask your hosting provider does they support higher limit size if yes then it will work otherwise you are wasting your energy
Upvotes: 0
Reputation: 3964
I have found the Solution
In my admin folder I have a php.ini
file
I have changed my memory_limit = 64M;
to memory_limit = 128M;
. Now it works fine.. I didn't get Fatal Error.
Upvotes: 9
Reputation: 1
Memory limit is more than enough. It seems that there is some endless loop in the script that is not letting it to terminate. Look for any for, while, do while loop in the script. If above remedy does not works, please share code so that issue can be examined further.
Upvotes: 0