VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: mauichiro on August 03, 2012, 00:56:19 AM

Title: Not sure what this message means
Post by: mauichiro on August 03, 2012, 00:56:19 AM
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 17152 bytes) in /home/content/69/8316469/html/administrator/components/com_virtuemart/classes/class.img2thumb.php on line 151

I got this error when I was adding an image to a product. Any help would be appreciated.
Mahalo
Title: Re: Not sure what this message means
Post by: ivus on August 03, 2012, 01:45:11 AM
Hi mauichiro,

That error means that the image you were trying to upload is way too big in dimension (not necessarily filesize).

Here is an interesting tool that will calculate the required memory needed by the server to resize images.

http://www.dotsamazing.com/en/labs/phpmemorylimit (http://www.dotsamazing.com/en/labs/phpmemorylimit)

Punch in your Source and Destination dimensions and click CALCULATE REQUIRED MEMORY...

The you'll see why you're getting that error. I found this on another unrelated forum

Quote

Generally, the rule of thumb is, width x height x 4 (rgba) for both the source and destination images, and don't forget about the amount of memory the script itself has already consumed.


SOURCE IMAGE : 4000px X 2462px
DESTINATION IMAGE : 300px X 185px
COLOUR : RGBa (3 channel + alpha)

(4000*2462 + 300*185) * 4 / 1024 / 1024 = 37.78mb THAT'S HUGE!!  :-\

I hope this clarifies things.