1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

vhost.cof being loaded but open_basedir not set

Discussion in 'Plesk for Linux - 8.x and Older' started by scarydog, Mar 29, 2006.

  1. scarydog

    scarydog Guest

    0
     
    Hi all,

    i have just upgraded to Plesk 8 and have found a number of sites not working because of new safe mode settings.

    I have been able to overcome these by changing ownership of some of the files to apache.

    I am having a problem with vhost.cof being loaded but not changing the open_basedir as I have set it.

    I have changed in the virtual hosts http.include and it is working but I understand that this change will be wiped.

    some values in the vhost.conf are being loaded and used, for instance i was able to set safe_mode_GID

    Any help would be much appreciated!

    Regards
    Nathan
     
  2. DCoats

    DCoats Guest

    0
     
    Im having the same issues i need php_admin_value open_basedir but since the upgrade we cant load any of the users vhost.conf's with any php_admin_value or php_admin_flag how are we supposed to set them now?
     
  3. mr3dblond

    mr3dblond Guest

    0
     
    same problem here
     
  4. crossconnect

    crossconnect Guest

    0
     
    You need to enclose your settings within <Directory>. The relevant parts of the httpd.include file looks like this:
    Code:
    <Directory /var/www/vhosts/example.com/httpdocs>
    	<IfModule sapi_apache2.c>
    		php_admin_flag engine on
    		php_admin_flag safe_mode on
    		php_admin_value open_basedir "/var/www/vhosts/example.com/httpdocs:/tmp"
    	</IfModule>
    	<IfModule mod_php5.c>
    		php_admin_flag engine on
    		php_admin_flag safe_mode on
    		php_admin_value open_basedir "/var/www/vhosts/example.com/httpdocs:/tmp"
    	</IfModule>
    </Directory>
    Include /var/www/vhosts/example.com/conf/vhost.conf
    Settings within <Directory> override settings within <VirtualHost> so those settings not explicitly set by Plesk (within the <Directory> in httpd.include) can be set fine, but otherwise your vhost.conf file needs to look like this (customised to whatever you need of course!):
    Code:
    <Directory /var/www/vhosts/example.com/httpdocs>
    	php_admin_flag safe_mode off
    	php_admin_value open_basedir none
    </Directory>
    I hope this helps you!
     
  5. mr3dblond

    mr3dblond Guest

    0
     
    Hi,

    thanks crossconnect!

    my fault was, thas I used:

    Code:
    <Directory /var/www/vhosts/example.com>
    	php_admin_flag safe_mode off
    	php_admin_value open_basedir none
    </Directory>
    
    and not:

    Code:
    <Directory /var/www/vhosts/example.com/httpdocs>
    	php_admin_flag safe_mode off
    	php_admin_value open_basedir none
    </Directory>
    
    Because of /var/www/vhosts/example.com/httpdocs was already set in httpd.include before, it cannot be overwriten with /var/www/vhosts/example.com/ (without /httpddocs)

    Ciao...
     
  6. crossconnect

    crossconnect Guest

    0
     
    No worries. I'm guessing that maybe the "httpdocs" bit was only added in Plesk 8.

    I'm a Plesk newbie (clean install with version 8) so I haven't had to go through the upgrade process, and from the sound of it, that's a good thing :)
     
  7. fastdrive

    fastdrive Guest

    0
     
    Damn, it needed the entry from a file named
    httpd.include

    /var/www/vhosts/<domain>/httpdocs:/tmp

    /tmp is probably some mystery path Plesk needs...

    I didn't know that with colons you can simply add entries.

    Everything is working now :)
     
  8. cmurphy@

    cmurphy@ Guest

    0
     
    Help Me!!!

    upgraded to plesk 8, have this issue now.

    Openbase_dir Error:
    Code:
    Warning: Unknown(): open_basedir restriction in effect. File(/home/httpd/vhosts/urbansherpa.biz/httpdocs/index.php) is not within the allowed path(s): (/home/httpd/vhosts/urbansherpa.biz/httpdocs) in Unknown on line 0
    


    This is what i have in the vhost.conf file

    Code:
    <Directory /home/httpd/vhosts/urbansherpa.biz/httpdocs>
    php_admin_value open_basedir "/home/httpd/vhosts/urbansherpa.biz/httpdocs"
    </Directory>
    <IfModule mod_php4.c>
    php_flag log_errors on
    php_value error_log "/home/httpd/vhosts/urbansherpa.biz/statistics/logs/error_log"
    </IfModule>
    <Directory /home/httpd/vhosts/urbansherpa.biz/httpdocs>
    php_admin_flag engine on
    php_admin_value register_globals 1
    php_admin_value safe_mode off
    </Directory>
    

    What am i doing wrong?

    No matter what i do, in phpconfig file it still shows global value of:
    /home/httpd/vhosts/urbansherpa.biz/httpdocs:/tmp


    and ignores the "local value" i have in the conf file.


    Please help me....
     
  9. Highland

    Highland Guest

    0
     
    You have two directory tags in your vhost file. Consolidate down to one.
     
Loading...