php.ini configuration: Memory limit

Discussion in 'PHP' started by norfstar, Feb 15, 2007.

  1. #1
    I've just got a new dedicated server which has 2GB RAM. I'm configuring the php.ini file, and the "Memory limit" variable is by default set to 8MB. Anyone have an idea of what a suitable value for this would be?

    The server has Fedora Core 4 running Apache. The purpose is solely for my own sites which will be using PHP and MySQL (so no need to factor in spare power for ASP, Perl etc.).

    P.S.
    I wasn't certain if this topic should be in the PHP or Site/Server Administration Forum, if I've chosen incorrectly my apologies in advance :).
     
    norfstar, Feb 15, 2007 IP
  2. tanfwc

    tanfwc Peon

    Messages:
    579
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If your PHP script keep getting time out, then you increase the memory limit or else you do not need to change anything. :D
     
    tanfwc, Feb 15, 2007 IP
  3. hamidof

    hamidof Peon

    Messages:
    619
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #3
    8MB is the best value for PHP4, but if you install the new PHP5.2.1 then it will set the memory limit to 16MB by default.
    Don't make it more than 16MB.
     
    hamidof, Feb 15, 2007 IP
  4. norfstar

    norfstar Peon

    Messages:
    1,154
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks for your help. Good job I asked - I was considering putting 512MB in there... :eek:
     
    norfstar, Feb 15, 2007 IP