|
Posted by Rik on 08/17/06 20:56
lawrence k wrote:
> I've a jpeg image that is 514k, which doesn't strike me as very large.
Well, it is 514K in compacted mode. When creating in image with GD it cen
quickly become very large.
> Yet I'm running out of error when I try to resize it:
>
> Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to
> allocate 12288 bytes) in
>
/home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/pdsIncludes/resizeImageT
oSquare.php
> on line 82
>
>
> How can I protect against out-of-memory errors?
Well, you could try to check your usage on various points in the script with
memory_get_usage(), and check what is causing it. You might be able to do things
more effeciently.
Number one protection against out-of-memory errors is descent code, but even
descent code may need more. If you truly need more memory, you should up the
memory limit.
Grtz,
--
Rik Wasmus
Navigation:
[Reply to this message]
|