How to turn off safe mode with htaccess

Discussion in 'Plesk 7.1 Reloaded Troubleshooting and Problems' started by edward, Sep 23, 2004.

  1. edward

    edward Guest


    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. cnelissen

    cnelissen New Member

    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. alex042

    alex042 Guest

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

    jstuart Guest

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

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

    /usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=<>
    and finally restart apache.
  5. jagsinc

    jagsinc Guest

    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/<>/httpdocs>
    <IfModule sapi_apache2.c>
    php_admin_flag safe_mode off
    php_admin_flag register_globals on

  6. jagsinc

    jagsinc Guest

    that works
  7. irzyxel

    irzyxel New Member

    hmm, whats the trick for subdomains ???

    <Directory /home/httpd/vhosts/>
    php_admin_flag safe_mode off

    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. Whistler

    Whistler New Member

    Yes :)
  9. arvin

    arvin New Member

    YES! It's worked!


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


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

    thnaks again.

Share This Page