Reply to Re: help! I'm getting "out of memory" errors when trying to resize an image

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация