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.

Suhosin and php memory limit PER account

Discussion in 'General Discussion' started by bin_asc, Jul 28, 2008.

  1. bin_asc

    bin_asc Well-Known Member

    Joined:
    Jul 18, 2005
    Messages:
    280
    Likes Received:
    0
    Trophy Points:
    16
    I`m interested in increasing the php memory limit for one of my accounts, but due to suhosin being installed and suPHP, I can`t add a .htaccess php_value setting. Any advice ?
     
  2. darren.nolan

    darren.nolan Well-Known Member

    Joined:
    Oct 4, 2007
    Messages:
    259
    Likes Received:
    0
    Trophy Points:
    16
    With suPHP you can't use .htaccess files to change things in PHP.

    You can however, create a new php.ini file in the directory of the script being run and place the new limit in there. I believe someone will also give you a more controlled example, but editing apache's httpd.conf to call a different php.ini, but with all your current settings (as it appears if a php.ini file is in the directory, everything in your main/primary php.ini is simply ignored).

    Might also take note suHosin prevents users from simply giving themselves more memory when they choose to do so.

    I can't recall what the default limit is (I think it just doesn't let users change memory limit) - but all requests in php.ini or from executing scripts are silently discarded.

    By setting the below, you can say this is the MAX memory that I'll allow accounts to request (not the default)

    suhosin.memory_limit 64

    Hope this helps.
     
  3. bin_asc

    bin_asc Well-Known Member

    Joined:
    Jul 18, 2005
    Messages:
    280
    Likes Received:
    0
    Trophy Points:
    16
    So basically if I set the php memory limit to 40 MB and set suhosin to 64MB it would allow scripts ( or custom php.ini`s ) to raise the memory to the allowed suhosin value.
     
  4. darren.nolan

    darren.nolan Well-Known Member

    Joined:
    Oct 4, 2007
    Messages:
    259
    Likes Received:
    0
    Trophy Points:
    16
Loading...

Share This Page