Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    156
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. LinuxTechie

    LinuxTechie Well-Known Member

    Joined:
    Jan 22, 2011
    Messages:
    502
    Likes Received:
    5
    Trophy Points:
    68
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. basic

    basic Active Member

    Joined:
    Nov 10, 2004
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    156
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. gkgcpanel

    gkgcpanel Well-Known Member

    Joined:
    Jun 6, 2007
    Messages:
    214
    Likes Received:
    0
    Trophy Points:
    166
    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,608
    Likes Received:
    32
    Trophy Points:
    238
    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/methods-increase-security-suphp-restricting-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).
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice