You are here: Re: PHP and memory use « All PHP « IT news, forums, messages
Re: PHP and memory use

Posted by Rik on 07/20/07 23:42

On Sat, 21 Jul 2007 01:21:12 +0200, Alfred Molon <a@b.c> wrote:
> I'm using a php script on a shared server to generate photo galleries on
> a site. The script was today blocked by the system, with the error
> message that the allowed memory size of 40MB was exhausted. I had to ask
> the host to increase this limit. They did it and the script now works
> again.
>
> However they said that they cannot allocate more than 65MB per PHP
> script and it is possible that in the future, when my site grows further
> I will again hit the limit. Is there a way to control how much memory a
> PHP script is using? How to reduce the amount of memory needed?

In gallery script, it's usually the resizing (or opening) of images that
require a lot of peak memory. The overall memory usage is usually pretty
low. If it's the resizing that does it, it's not very likely the memory
usage will increase dramatically any further, the peaks will usually be
around the same, allbeit maybe more often. Don't forget the destroy()
statements en save/cache the resized images, and I'd think you'd be
allright.
--
Rik Wasmus

 

Navigation:

[Reply to this 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

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