Page 1 of 1
Fatal error: Allowed
Posted: 03 May 2008, 13:43
by Jimbo
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 12288 bytes) in /administrator/components/com_phocagallery/helpers/phocagallery.php on line 619
why phocagallery needs more then 32MB memory?
Phoca Gallery doesn&
Posted: 05 May 2008, 12:48
by Jan
Phoca Gallery doesn't need it... The thumbnails are created by your GD library on your Server...
if you are right, th
Posted: 05 May 2008, 14:05
by Jimbo
if you are right, then why GD library needs more then 32MB memory?
I am right, because
Posted: 05 May 2008, 14:15
by Jan
I am right, because Phoca Gallery cannot create the thumnails Thumbnails are made by your server, by GD library ...
GD library (extension of PHP) needs so much RAM and CPU because it is not so easy to work with an image, so the computer (server) needs so much RAM for work with it (e.g. resampling of an image takes a lot of RAM and CPU) ... This is the same question why the Windows XP or some Linux distribution need e.g. 256 MB RAM to work... Try to resample some image (e.g. image with 1.2 MB which was created by a camera) by some old computer with 8 MB RAM ... I think it will not work ...
my webhost said its
Posted: 05 May 2008, 14:21
by Jimbo
my webhost said its just bad coding, and that your component should free memory in the process (by the way its not 8 its 32 MB)
is it true?
Did your webhost see
Posted: 05 May 2008, 14:56
by Jan
Did your webhost see the code? If yes, understand your webost his own work? If no, does he tell lies?
First, Phoca Gallery finds out, how much RAM you have available:
If less than 50, Phoca Gallery will try to set 50 MB RAM for Image creating (if function ini_set is disabled, you cannot create the thumnails, because GD need this RAM). After setting the 50 MB of RAM, GD function can create the thumbnails....
After thumbnail creating, Phoca Gallery will set the RAM back to your value in case your value was smaller than 50 MB
But before setting back the RAM, ImageDestroy function will be used... This function free the memory...
If Multiple Add is used, the same happens BUT after 1 image creating, it comes the http redirect, so new script will be called (it means, the memory must be free: IMAGE DESTROYING + RAM SETTING BACK + LEAVING THE SCRIPT)
Jan