You are here: Re: server-side: how to increase PHP's memory window ..? « All PHP « IT news, forums, messages
Re: server-side: how to increase PHP's memory window ..?

Posted by ZeldorBlat on 03/16/07 03:35

On Mar 15, 8:45 pm, "Thomas" <t...@thom.com> wrote:
> hello,
>
> I'm installing an open-source php photo gallery (gallery 2.1) that seems to
> require a greater memory limit than my current PHP setup is allowing (8 Mb).
> They request a min of 16 Mb.
>
> I have root access to the server (linux / bsd) with Putty, but am not at all
> versed in any server-side DOS commands or syntax.

So is it DOS or Linux? I'll assume Linux...

>
> is there a simple way to do this, that a non-nerd like myself can do with
> Putty? they suggest changing a line in PHP.INI.
>
> thanks for any "a-b-c" simple lessons!!
>
> Thomas

You do need to change php.ini. The directive you want to change is
called memory_limit. How you do that is up to you. Given that you
have shell access to a Linux box I'd suggest using vi (that's how I
would do it, anyway).

Here are the specifics which, if the server is set up like most,
should work:

Log in as root.
Type the following and hit enter: vi /usr/local/lib/php.ini
Now that you're in vi, hit escape a few times then type the following
and hit enter: /memory_limit
That basically does a "find" in the file you're editing.
Press the "i" key. This puts you in "insert" mode, which basically
allows you to edit things.
Change the current setting (probably 8M) to 16M.
Press escape, then type :wq and hit enter. That says "save the file
and quit."
Restart apache. You'll need to find "apachectl." To find it, type
the following and hit enter: locate apachectl
That should tell you where it's at. Suppose it's in /usr/local/
apache2/bin/apachectl. To restart it, use these two commands (hitting
enter after each one):
/usr/local/apache2/bin/apachectl stop
/usr/local/apache2/bin/apachectl start

And that's all there is to it :) Hopefully it works.

 

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

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