Page 2 of 2
Re: imagemagic.php Error on line 220
Posted: 24 Sep 2009, 19:33
by pdenessen
Yep:
Fatal error: Out of memory (allocated 44040192) (tried to allocate 13824 bytes) in /mnt/web5/12/73/52092673/htdocs/administrator/components/com_phocagallery/libraries/phocagallery/image/imagemagic.php on line 220
If you want I can sent you PM with the link to the backend.
Patrick
Re: imagemagic.php Error on line 220
Posted: 05 Oct 2009, 22:00
by Jan
Hi, no idea what can be wrong there

as I am not server expert, i really don't know what can be the problem with the memory there ? this problem is caused when the script (php function) try to use GD on the server. So what can be wrong:
- script (tested on many servers by many users)
- memory or php settings
- GD settings
- server settings ?
Re: imagemagic.php Error on line 220
Posted: 06 Dec 2009, 18:19
by pdenessen
I had the problem already solved.
I added the line
upload_max_filesize = 4M
to my php.ini settings.
This means that the uploaded files in my case may not be bigger then 4MB. I do not not what the default setting is when leaving this parameter.
Although it would be better, if the program could give a "good" error message pointing to this problem.
@ Jan : Can you have a look at it
thx
Patrick
Re: imagemagic.php Error on line 220
Posted: 09 Dec 2009, 16:54
by Jan
Hi, fatal errors cannot be managed, if you run script and it does not have enough php memory to run, you get fatal error and you have not memory to catch the error.
Jan
Re: imagemagic.php Error on line 220
Posted: 09 Dec 2009, 17:41
by pdenessen
Is there no way to check the image-size against the php settings bedore the scripts runs?
It is not nice when a program crashes, and I think that the user should be warned before.
Is it else possible to add this to a system check, where the program checks all kind of settings ?
Re: imagemagic.php Error on line 220
Posted: 10 Dec 2009, 16:25
by Jan
Hi, as I wrote above, you cannot manage fatal errors, you cannot check for fatal error
User cannot be warned before, because there are millions severs with millions of possible settings so you cannot make some limit because you don't know on which server on which settins the application will be run.
So if you have some standard server you can make thumbnails e.g. from images 3072x2304 but if you server doesn't have enough php memory and CPU, then your server will return fatal error - this cannot be managed and cannot be know before...
So it depends on administrator to prevent from possible fatal errors. He/she can set:
- maximum file size for upload
- maximum resolution of an image - width
- maximum resolution of an image - height, ...
So if administrator knows, the server can have problems with php memory, he/she should reduce these parameters
Jan
Re: imagemagic.php Error on line 220
Posted: 27 Dec 2009, 17:50
by luisraposo
hello Jan,
just to mention that with latest version 2.6.1 of the component, this error exists no more.
good work!
luis raposo
Re: imagemagic.php Error on line 220
Posted: 29 Dec 2009, 00:15
by Jan
Great to hear it. Jan
Re: imagemagic.php Error on line 220
Posted: 16 Apr 2011, 16:22
by mamool
hi
i use phocagallery 2.7.2
and joomla 1.5.21
i got this error : Fatal error: Out of memory (allocated 64749568) (tried to allocate 17280 bytes) in /home/aria/public_html/fa/administrator/components/com_phocagallery/libraries/phocagallery/image/imagemagic.php on line 216
my memory_limit : 64 MB
i change the code in imagemagic.php:
if ($memory < 50) {
ini_set('memory_limit', '50M');
$memoryLimitChanged = 1;
}
to
if ($memory < 128) {
ini_set('memory_limit', '128M');
$memoryLimitChanged = 1;
}
but it dosent work
i access to my php.ini file , i incress the memory_limit to 128MB , but i got same error
please help me
Re: imagemagic.php Error on line 220
Posted: 18 Apr 2011, 22:05
by Jan
Hi, maybe this is still not enough for your images, try to check the resolution of your images. GD library on your server seems cannot work them.
Jan