Results 1 to 9 of 9

Thread: How to turn off safe mode with htaccess

  1. #1
    edward
    Guest

    Default How to turn off safe mode with htaccess

    Hi

    i am very new to the whole php scripting world and am trying to install a gallery on my Web site hosted using Plesk 7 reloaded for unix. I have been told i need an .htaccess file to disable the safe mode for my domain but am unsure what needs to be included in this htaccess file.

    Help please



  2. #2
    Kilo Poster
    Join Date
    Sep 2004
    Posts
    11

    Default

    I dont have a working .htaccess file for you to use, but this is the directive you need to add to an .htaccess file

    php_value safe_mode "0"



  3. #3
    alex042
    Guest

    Default

    This may only work if allow overrides is allowed on the server.



  4. #4
    jstuart
    Guest

    Default

    your BEST bet is if you want to do it domain wide is create in /home/http/vhosts/<domain.com>/conf a vhost.conf file which includes the following:

    Code:
    <Directory /home/httpd/vhosts/<domain.com>/httpdocs>
        <IfModule sapi_apache2.c>
            php_admin_flag safe_mode off
        </IfModule>
    </Directory>
    and then as root, run the following command:

    Code:
    /usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=<domain.com>
    and finally restart apache.



  5. #5
    jagsinc
    Guest

    Default register_globals with safe_mode in the vhost.conf

    If I wanted to turn php safe mode off and register_globals on for the domain would the vhost.conf look like this?

    <Directory /home/httpd/vhosts/<domain.com>/httpdocs>
    <IfModule sapi_apache2.c>
    php_admin_flag safe_mode off
    php_admin_flag register_globals on
    </IfModule>
    </Directory>

    Thanks



  6. #6
    jagsinc
    Guest

    Default

    that works



  7. #7
    Kilo Poster
    Join Date
    Apr 2004
    Posts
    68

    Default

    hmm, whats the trick for subdomains ???

    <Directory /home/httpd/vhosts/domainname.com/subdomains/foo/httpdocs>
    php_admin_flag safe_mode off
    </Directory>

    doesnt work for me, atleast on in the main domains conf dir
    does it need to be in the subdomains/foo/conf/vhost.conf ?



  8. #8

    Default

    Originally posted by irzyxel
    does it need to be in the subdomains/foo/conf/vhost.conf ?
    Yes
    Kind regards
    Geert Lund - [url]www.gld.dk[/url]
    PSA-phpMyAdmin 2.6.3-pl1 - see: [url]www.gld.dk/psa/[/url]



  9. #9
    Kilo Poster
    Join Date
    Apr 2006
    Posts
    48

    Default

    YES! It's worked!

    Thanks!

    but I do a test before and after do change with a PHPinfo() function:

    <?php
    phpinfo();
    ?>

    and save on my httpdocs and browse it before and after do the changes I nedd for certain site.

    thnaks again.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •