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?
Fatal error Thumbnails Creation
-
- Phoca Member
- Posts: 39
- Joined: 03 May 2008, 13:31
- Contact:
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Phoca Gallery doesn&
Phoca Gallery doesn't need it... The thumbnails are created by your GD library on your Server...
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 39
- Joined: 03 May 2008, 13:31
- Contact:
if you are right, th
if you are right, then why GD library needs more then 32MB memory?
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
I am right, because
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 ...
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 ...
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 39
- Joined: 03 May 2008, 13:31
- Contact:
my webhost said its
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?
is it true?
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Did your webhost see
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
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
If you find Phoca extensions useful, please support the project