Forum Moderators: coopster

Message Too Old, No Replies

Increasing PHP Memory!

What file to edit..?

         

ahmedtheking

2:37 pm on Jan 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I recently installed Moodle onto one of my websites. It spoke about increasing my PHP memory up to 16MB. But how do it do this?

I came across this article:

[moodle.org...] (Log in as guest) which spoke about it, but didnt really help me!

I contacted my hosting people and they asked which PHP.INI file to edit (as this article states to edit a PHP.INI file: [hardhathosting.com...] )

Any sugs?

ergophobe

5:17 pm on Jan 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



They don't sound real with it - they need to edit the php.ini file that controls php on your server or account. There's only one!

Anyway, the line they're looking for is

memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)

ahmedtheking

10:34 am on Jan 2, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ok cool, ive told them that, let's see what happens! :D

JohnKelly

1:45 am on Jan 4, 2005 (gmt 0)

10+ Year Member



Out of curiosity, is there a max you can set or certain precentage of the RAM that PHP can use. My PHP.ini file was using 8MB (probably the default), but my dedicated box has 2000MB of RAM available. I increased the memory limit in the PHP.ini file to 128MB to see what happens.

vidman

2:59 am on Jan 4, 2005 (gmt 0)

10+ Year Member



If you don't have direct access to PHP.INI, want immediate results or just a temporary increase, you can put this in .htaccess

php_value memory_limit 16M

I use this method to get enough mem to run Gallery tools/cleanup utils. I have to up mine to 23M!

If you use this method to run special util scripts, remember to change memory_limit back when you're finished.