Page 1 of 1
how to avoid "out of memory" error when i create a thumbnail
Posted: Wed Jan 07, 2009 11:14 pm
by lukelee
Hi, guys, i am making a cms to allow people upload 5 images at once, the problem is when the total size>1.3mb, "fetal error- out of memory" occurs. is there any way to avoid it? my memory limit is 64 and i cant change this number.
Re: how to avoid "out of memory" error when i create a thumbnail
Posted: Wed Jan 07, 2009 11:43 pm
by requinix
Ha ha, "fetal" error.
First, are you using imagedestroy when you finish thumbnailing? That frees up memory.
If that doesn't help and you can't increase the memory limit then you have two choices:
1) Use something else to make thumbnails (like ImageMagick)
2) Impose a limit on the size of images
Re: how to avoid "out of memory" error when i create a thumbnail
Posted: Thu Jan 08, 2009 3:45 am
by lukelee
seems thats a common problem.
whats the imagedestroy? and how to use it? is it a code?
and i have heared about imagemagick, but dont know how to use it.
I would like to try both way, can you provide me some samples?
thanks.