• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Open_basedir problem

T

ThayalanT

Guest
Hello,

I am getting the following errors in php error log and some web pages appear blank.

[04-Jan-2010 08:00:32] PHP Warning: Unknown: open_basedir restriction in effect. File(/var/www/vhosts/<domain name>/httpsdocs/phpinfo.php) is not within the allowed path(s): (HV<8f> ar/www/vhosts/<domain name>/httpdocs) in Unknown on line 0
[04-Jan-2010 08:00:32] PHP Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0
[04-Jan-2010 08:00:32] PHP Fatal error: Unknown: Failed opening required '/var/www/vhosts/<domain name>/httpsdocs/phpinfo.php' (include_path='.:..:../..:/usr/local/zend/share/ZendFramework/library:/usr/local/zend/share/pear:/var/www/vhosts/<domain name>/httpsdocs') in Unknown on line 0
[04-Jan-2010 08:10:01] PHP Warning: Unknown: open_basedir restriction in effect. File(/var/www/vhosts/<domain name>/httpsdocs/1.0/common/monitor.php) is not within the allowed path(s): (ü^F<90> ar/www/vhosts/<domain name>/httpdocs:/tmp) in Unknown on line 0
[04-Jan-2010 08:10:01] PHP Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0
[04-Jan-2010 08:10:01] PHP Fatal error: Unknown: Failed opening required '/var/www/vhosts/<domain name>/httpsdocs/1.0/common/monitor.php' (include_path='.:..:../..:/usr/local/zend/share/ZendFramework/library:/usr/local/zend/share/pear:/var/www/vhosts/<domain name>/httpsdocs') in Unknown on line 0

I then edited the httpd.include file directly by putting the values:
php_admin_flag safe_mode off
php_admin_value open_basedir "/:/var/www/vhosts/<domain name>/httpsdocs:/tmp"

By putting root path to open_basedir, I thought it should allow for all access since I am using a dedicated server. After that when I restarted apache, it worked for a few days and after that the blank pages problem start to appear with the above-mentioned errors in error log but the httpd.include file has the values that I modified. Later, after going through other problems in Parallels Forum, I entered the following entries in the vhost_ssl.conf file.

SSLEngine on
SSLPROTOCOL -ALL +SSLv3 +TLSv1
SSLCipherSuite -ALL:!ADH:RC4+RSA:+HIGH:!EXP

<Directory /var/www/vhosts/<domain name>/httpsdocs>
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir "/:/var/www/vhosts/<domain name>/httpsdocs:/tmp"
SSLRequireSSL
Options -Includes -ExecCGI -Indexes
</Directory>

and then I entered the following command: /usr/local/psa/admin/sbin/websrvmng -a -v

I wanted to know whether the format of the entry into vhost_ssl.conf file is correct. If not, what is the correct format? If wrong file, then which file do I have to edit?

The site seems to be working but I want to know whether this is correct so that after a few days the same old problem should not happen.

Thank You!
 
Modifying the httpd.include is what caused the problem to come back; those files get regenerated after certain activities. Adding to the vhost file should keep it from happening again. Your open basedir is correct but if you're just setting it to / you may as well just set "php_admin_value open_basedir none" instead.
 
Back
Top