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.

safe mode off in htaccess

Discussion in 'General Discussion' started by wills, Aug 26, 2003.

  1. wills

    wills Well-Known Member

    Joined:
    Jan 29, 2003
    Messages:
    202
    Likes Received:
    1
    Trophy Points:
    18
    Anyone know the directive for turning safe mode off in htaccess?

    cPanel.net Support Ticket Number:
     
  2. mjm

    mjm BANNED

    Joined:
    Aug 1, 2003
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    6
    why do you want to turn safe mode off?

    'php_flag safe_mode off' perhaps?

    cPanel.net Support Ticket Number:
     
  3. wills

    wills Well-Known Member

    Joined:
    Jan 29, 2003
    Messages:
    202
    Likes Received:
    1
    Trophy Points:
    18
    there is a client that has a script that is basically trying to create files, which Safemode is preventing from happening.

    I tried that, didn't work. Oh well.

    cPanel.net Support Ticket Number:
     
  4. Water

    Water Active Member

    Joined:
    Jun 17, 2003
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    There is a way to turn safe mod off just for one account. I just don't know the way. Try searching around. Safe Mod is a good thing to have on.

    cPanel.net Support Ticket Number:
     
  5. NiN

    NiN Active Member

    Joined:
    Apr 30, 2003
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Braga, Portugal
    You cannot turn safe_mode off in .htaccess.

    You can only change this value in system files (root access needed); php.ini or in <virtualhost> entry in apache's httpd.conf.
    More info: http://www.php.net/features.safe-mode

    HOW-TO:
    Changing safe_mode to off (or on) in just one domain

    edit /usr/local/apache/conf/httpd.conf
    find something similar to:
    of the domain name you wish to change, and palce inside <virtualhost></virtualhost>:
    <IfModule mod_php4.c>
    php_admin_flag safe_mode off (or on)
    </IfModule>

    That way, domain.com will have safe_mode disabled (or enabled)
     
  6. donnie

    donnie Active Member

    Joined:
    May 23, 2003
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    uk
    But this doesn't work for me !!! Is there any other way to do it ??

    cPanel.net Support Ticket Number:
     
  7. NiN

    NiN Active Member

    Joined:
    Apr 30, 2003
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Braga, Portugal
    Yeah ...

    Try "php_admin_value safe_mode 0" then ...
    This one works correctly, I am sure :D

    cPanel.net Support Ticket Number:
     
  8. donnie

    donnie Active Member

    Joined:
    May 23, 2003
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    uk
    Thanks for your help.

    But it doesn't work :(

    I'm running Linux RedHat 7.3 Sever and Apache Build without phpSuexec and would like to use Safe Mode but I need to exclude one of my sub-Domain from Safe Mode.

    I used both the methods expained here but they didn't work for me.

    Please help me.

    cPanel.net Support Ticket Number:
     
  9. munk

    munk Member

    Joined:
    Sep 6, 2003
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    This is the way to do it - are you sure you restarted the server after adding:

    php_admin_flag safe_mode off

    to the user's vhost entry in httpd.conf?

    cPanel.net Support Ticket Number:
     
  10. oderland

    oderland Well-Known Member
    PartnerNOC

    Joined:
    Dec 30, 2002
    Messages:
    103
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Kungsbacka, Sweden
    Make sure that mod_php4.c mod is loaded otherwise it will not work
     
  11. alex042

    alex042 Well-Known Member

    Joined:
    Sep 13, 2003
    Messages:
    76
    Likes Received:
    0
    Trophy Points:
    6
    The safemode off directive is usually set to only work in httpd file in which you need root access to change. It can't usually be set in an .htaccess file or it would be basically useless. You just add the above directive to httpd under the specific domain's virtual listing. This will shut off safemode for the entire account, not just a subdomain.
     
  12. greenwater

    greenwater Member

    Joined:
    May 31, 2005
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    <IfModule mod_php4.c>
    php_admin_flag safe_mode off
    </IfModule>


    very thanks ;)
     
Loading...

Share This Page