Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 12 of 12
  1. #1
    Member
    Join Date
    Jan 2003
    Posts
    202

    Default safe mode off in htaccess

    Anyone know the directive for turning safe mode off in htaccess?

    cPanel.net Support Ticket Number:

  2. #2
    mjm
    mjm is offline
    BANNED
    Join Date
    Aug 2003
    Posts
    69

    Default

    why do you want to turn safe mode off?

    'php_flag safe_mode off' perhaps?

    cPanel.net Support Ticket Number:

  3. #3
    Member
    Join Date
    Jan 2003
    Posts
    202

    Default

    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. #4
    Member
    Join Date
    Jun 2003
    Posts
    27

    Default

    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. #5
    NiN
    NiN is offline
    Member
    Join Date
    Apr 2003
    Location
    Braga, Portugal
    Posts
    29

    Default

    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:
    <VirtualHost IP.IP.IP.IP>
    ServerAlias www.domain.com domain.com
    ServerAdmin webmaster@domain.com
    DocumentRoot /home/user/public_html
    (...)
    </VirtualHost>
    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)
    ~ DM

  6. #6
    Member
    Join Date
    May 2003
    Location
    uk
    Posts
    37

    Default

    But this doesn't work for me !!! Is there any other way to do it ??

    cPanel.net Support Ticket Number:

  7. #7
    NiN
    NiN is offline
    Member
    Join Date
    Apr 2003
    Location
    Braga, Portugal
    Posts
    29

    Default

    Yeah ...

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

    cPanel.net Support Ticket Number:
    ~ DM

  8. #8
    Member
    Join Date
    May 2003
    Location
    uk
    Posts
    37

    Default

    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. #9
    Member munk's Avatar
    Join Date
    Sep 2003
    Posts
    24

    Default

    Originally posted by NiN
    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 tof 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)
    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. #10
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Dec 2002
    Location
    Kungsbacka, Sweden
    Posts
    103

    Default

    Originally posted by donnie
    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:
    Make sure that mod_php4.c mod is loaded otherwise it will not work

  11. #11
    Member
    Join Date
    Sep 2003
    Posts
    76

    Default

    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. #12
    Member
    Join Date
    May 2005
    Posts
    14

    Default

    <IfModule mod_php4.c>
    php_admin_flag safe_mode off
    </IfModule>


    very thanks

Similar Threads & Tags
Similar threads

  1. safe mode (on or off )
    By Rashad in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 03-05-2008, 12:30 AM
  2. Safe Mode
    By _sombra_ in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 02-04-2004, 08:43 PM
  3. Safe Mode - A B.U.G ???
    By donnie in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 09-11-2003, 11:38 AM
  4. Safe Mode!! Help??!?
    By SimGuy in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 02-04-2003, 07:47 PM
  5. PHP Safe Mode
    By IT Hosting in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 07-04-2002, 07:05 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube