The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

good memory_limit size for shared server?

Discussion in 'General Discussion' started by basic, Mar 10, 2011.

  1. basic

    basic Active Member

    Joined:
    Nov 10, 2004
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    Hello All:

    What do you guys suggest for a shared server with 300 to 400 domains on it (e.g. a Quad-Core 2.50 GHz with 8 GB RAM) as "memory_limit" setting in "php.ini"? We now have it at 64 MB. A customer wants 128 MB.
    Any suggestions and experiences with higher values such as 128 MB ?

    Thanks for sharing.

    John
     
  2. LinuxTechie

    LinuxTechie Well-Known Member

    Joined:
    Jan 22, 2011
    Messages:
    502
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Hi John,

    If a client wants to increase the memory_limit you can create a custom php.ini / .htaccess depending on the built, in the public_html of his domain. There is no need to modify it server wide, which may cause resource abuse.
     
  3. basic

    basic Active Member

    Joined:
    Nov 10, 2004
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    Thanks cPtechie, I know. In our case server runs suPHP, so we would have to do it with a copy of the php.ini in his account and raise it there.
    BUT my real question is -- what is these days with an average server (see first posting) the best *global* setting for a shared server like that ... what do other hosting companies do, what do newer scripts require?

    Thanks,
    John
     
  4. gkgcpanel

    gkgcpanel Well-Known Member

    Joined:
    Jun 6, 2007
    Messages:
    217
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    The problem with having individual php.ini settings in the users public_html file is that then every user can also do the same and wreck havoc on the server as well. We have it set so that all customers use a server wide php.ini and if they put their own php.ini file in place, it is simply ignored. However, that also prevents us from being able to set a custom php.ini (that we control) in another location...

    Has anyone figured out a way to allow us to put a php.ini in another location not accessible by the user that we can make custom changes to that would effect just the users site?
     
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    If you are using suPHP, you can create a custom php.ini file but restrict most users to the main php.ini file by using the suggestions in this thread:

    http://forums.cpanel.net/f185/metho...ricting-who-can-use-php-ini-files-167186.html

    The best way to do it is when you have PHP 5.3 since it allows two methods to do it. One method allows users who have a custom php.ini to have it configured for allowing that user to have one in /usr/local/lib/php.ini, and the other method allows just giving a user some settings that are different than the rest of the global settings in /usr/local/lib/php.ini

    The best part about these PHP 5.3 variables is that they aren't PHP handler specific. You can use them with all 4 handlers (CGI, DSO, FCGI and suPHP).
     
Loading...

Share This Page