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.

suphp how do raise the limits in the main php.ini file

Discussion in 'Security' started by DWHS.net, Apr 2, 2013.

  1. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    I have done this before but I cannot find anywhere what the settings are for raising suphp settings. I need the ram limit to be higher.
     
  2. quizknows

    quizknows Well-Known Member

    Joined:
    Oct 20, 2009
    Messages:
    940
    Likes Received:
    55
    Trophy Points:
    28
    cPanel Access Level:
    DataCenter Provider
    /usr/local/lib/php.ini is normally global. You can make sure from a command line with

    php -i | grep .ini

    Should see:
    Loaded Configuration File => /usr/local/lib/php.ini

    If you want one site to have it's own php.ini that over-rides those settings, then do this:

    cp -p /usr/local/lib/php.ini /home/$USERNAME/public_html/php.ini

    then add this to the users .htaccess in public_html/.htaccess:

    suPHP_ConfigPath /home/$USERNAME/public_html
    <Files php.ini>
    order allow,deny
    deny from all
    </Files>

    You can then change settings in that users php.ini to over-ride global defaults. You can make a phpinfo() file to make sure your changes like memory limit are set correctly.
     
  3. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    No this would be for the whole server and yes I nee to change it in the php.ini file.

    These are suphp process variables in the php.ini. Not paths or Apache variables.
     
  4. quizknows

    quizknows Well-Known Member

    Joined:
    Oct 20, 2009
    Messages:
    940
    Likes Received:
    55
    Trophy Points:
    28
    cPanel Access Level:
    DataCenter Provider
    SuPHP is configured in /opt/suphp/etc/suphp.conf but I don't think there are any memory limits there. What do you mean by you need the "ram limit to be higher?" You don't mean php memory_limit?
     
  5. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    In SSH command prompt (as root) type:

    Code:
    php --ini
    
    you get something like this:

    Code:
    Configuration File (php.ini) Path: /usr/local/lib
    Loaded Configuration File:         /usr/local/lib/php.ini
    Scan for additional .ini files in: (none)
    Additional .ini files parsed:      (none)
    
    The line:
    Loaded Configuration File: /usr/local/lib/php.ini
    tells that your server's PHP is using file /usr/local/lib/php.ini

    In that file you can do the changes you desire.
     
Loading...

Share This Page