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.

Disable Suhosin - How?

Discussion in 'General Discussion' started by DReade83, May 24, 2008.

  1. DReade83

    DReade83 Well-Known Member

    Joined:
    Oct 20, 2006
    Messages:
    196
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Cheshire, UK
    How can one disable Suhosin on a per directory basis? I can't even find the suhosin config file - does one exist?
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,447
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  3. DReade83

    DReade83 Well-Known Member

    Joined:
    Oct 20, 2006
    Messages:
    196
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Cheshire, UK
    Indeed it is, but that doesn't answer my question.

    I've added "suhosin.simulation = On" to the end of my php.ini file, restarted Apache, but Suhosin is still running, and blocking scripts! Any ideas?
     
  4. rhenderson

    rhenderson Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    785
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Oklahoma
    cPanel Access Level:
    Root Administrator
    After you added

    Code:
    [suhosin]
    ; Misc Options
    suhosin.simulation = On
    the restarted Apache, look at your phpinfo in the suhosin section and see what the value of suhosin.simulation is.. If it is still on are you sure you edited the correct php.ini file? If it says it is off then it is off, if I am not mistaken it will SIMULATE in the logs what it would have blocked.
     
  5. orakanggo

    orakanggo Registered

    Joined:
    Apr 9, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    How can I disable SUHOSIN via .htaccess? because I don't have root access to modify /usr/local/lib/php.ini

    thanks
     
  6. petteyg359

    petteyg359 Member

    Joined:
    May 15, 2008
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Code:
    php_flag suhosin.simulation On
    This won't work if you're using suPHP.
     
  7. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    If you are using suphp, try

    1) adding this to your .htaccess
    Code:
    <Files ".ht*">
    deny from all
    </Files>
    
    suPHP_ConfigPath /home/username
    
    2 then create a php.ini file at /home/username/php.ini with this
    Code:
    suhosin.simulation = On
    Note: This may be disabled by your host. If it does work, you may have to add other things to your php.ini file as it will completely over-ride the server-wide one, not just add to it.
     
  8. orakanggo

    orakanggo Registered

    Joined:
    Apr 9, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hi, I got 500 Internal Server Error when adding those lines.
    The hosting server only load php.ini from /usr/local/lib/php.ini

    phpinfo in http://www.oxysehat.com/test.php

    any solutions?
     
Loading...

Share This Page