Page 1 of 1

Error while uploading an Image

Posted: Thu Nov 04, 2010 7:55 am
by Beachgirl
While uploading an image using admin I received this error:

Code: Select all

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 12288 bytes) in /home/p164h3jq/public_html/library/image/image.php on line 85

Code: Select all

  line 85:      		$source = imagecreatefromjpeg(DIR_IMAGE . $image);
The image I was uploading was only around 100 kb and if I mistakenly grabbed the wrong image that one would have been 2.5mb.
I googled the error and most fixes suggested that the memory_limit needed to be changed in th php.ini file.
I do not have this file and or don't have access to it through my hosting server after calling them to find out.
They suggested that I create my own php.ini file and put it into the folder where the error is happening and move backwards from there by placing the same file in every folder leading up to it.
I made the file with only this line "memory_limit = 32M;" (tried 64M as well) I did this and of course the error is still there.

The entire image section in admin is now down. However, I am still able to upload images through my ftp and add them to products.

Re: Error while uploading an Image

Posted: Thu Nov 04, 2010 8:51 am
by Brent
Just to test, add this in common.php right under //REPORT ALL ERRORS.
It will tell you what they have memory limit set at.

Code: Select all

echo ini_get('memory_limit');


Then add this just above that line.

Code: Select all

ini_set('memory_limit', '64M');
See if that fixes your problem and let us know the results.

Re: Error while uploading an Image

Posted: Thu Nov 04, 2010 12:50 pm
by Beachgirl
Yes, problem fixed! Thank you so much Brent :P