How can I relax PHP's open_basedir restriction? How can I relax PHP's open_basedir restriction? apache apache

How can I relax PHP's open_basedir restriction?


You can also do this easily on a per-directory basis using the Apache (assuming this is your web server) configuration file (e.g. httpd.conf)

<Directory /var/www/vhosts/domain.tld/httpdocs>php_admin_value open_basedir "/var/www/vhosts/domain.tld/httpdocs:/var/www/vhosts/domain.tld/zend"</Directory>

you can also completely remove the restriction with

<Directory /var/www/vhosts/domain.tld/httpdocs>php_admin_value open_basedir none</Directory>


add the paths you need to access to (/var/www/vhosts/domain.tld/zend) to your open_basedir directive (you can specify several paths using the path separator ':' or ';' in windows)

note that the values in the open_basedir are prefixes, which means that anything under the /var/www/vhosts/domain.tld/zend will be accessible


In Parallels Plesk Panel (e.g. 1and1) you can do it in the PHP panel settings:

enter image description here

here:

enter image description here