Help - Search - Members - Calendar
Full Version: Please howto php_admin_value open_basedir
The Planet Forums > Control Panels > Plesk
Gonzalo2002
When i made a new domain in httpd.include on var/www/vhosts/domain.com/conf there is a line like this " php_admin_value open_basedir "/var/www/vhosts/domain.com....."

Please, what file have i to modify for this lines not appear?

Thanks
netfusionx
Hello,


As Plesk does not use httpd.conf file for writing the vhost entries of the domain, they are written in httpd.include.

The code of php is for the php scripts to use the server /tmp directory for execution, if you remove that from the file then the PHP scripts might get problem for execution.So I suggest you to keep the files.


Thanks,
http://netfusionx.com/forum
Forum for Plesk.
revolution
hi,

open_basedir is not actually for specifying the tmp dir that php will use. it is a security restriction used to restrict what certain php functions can access.

http://www.php.net/features.safe-mode#ini.open-basedir

If this is a shared server than you will be causing bigger security problems than exist by default with php on plesk[1] by removing the open_basedir restriction. If you must, howerver, you would need to do this in a vhost.conf file for the site rather than the httpd.include file as plesk will overwrite httpd.include. Please detects a vhost.conf and/or vhost_ssh.conf file and makes an include to it from the site's httpd.include.

In that vhost.conf (a file you have to create in the conf/ directory for the site) you would need to remove the open_basedir restriction in a different context than just in the VirtualHost definition, as one is already supplied there by plesk (in the httpd.include). So you would use something like this in your vhost.conf:

CODE
<Location />

php_admin_value open_basedir "list_of_accessible_directories_here"

</Location>


or


CODE
<Location />

php_admin_value open_basedir none

</Location>


to remove it altogether. Then run:

CODE
/usr/local/psa/admin/bin/websrvmng --reconfigure-vhost --vhost-name=yourdomain.com

apachectl configtest

apachectl graceful

(only run apachectl graceful if the configtest is OK).

Anyways, that's the information you asked for, but please note that disabling open_basedir is Not A Good Idea ™ unless you really know what you're doing, so I'd suggest instead trying to figure out how to tweak the open_basedir value rather than get rid of it completely.

Notes:
1. Just about all control panels have very insecure default site script security setups. Ensim is the only one that allows for very good securty for a total novice, but it's a horrible control panel in just about every other aspect. One's best bet is learning how to make plesk secure.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.