|
Posted by m2m tech on 08/18/06 07:03
.... or just increase the availabe memory:
ini_set('memory-limit', '8M');
Rik wrote:
> 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,
--
--------------------------------------------
m2m server software gmbh - http://www.m2m.at
Navigation:
[Reply to this message]
|