This is a quick fix for PHP errors like these on a Media Temple DV:
Warning: include_once() [function.include-once]: open_basedir restriction in effect.
I got this a few days ago when trying to setup an app. There are instructions in Media Temple’s site on how to fix this but this set of steps is what worked for me.
- Edit or create a
vhost.conf
file inside this folder:/var/www/vhosts/YOURDOMAIN.COM/conf/
. ReplaceYOURDOMAIN.COM
with the domain you wish to configure. -
Add this in
vhost.conf
:<Directory /var/www/vhosts/YOURDOMAIN.COM/httpdocs> <IfModule sapi_apache2.c> php_admin_value open_basedir "/var/www/vhosts/YOURDOMAIN.COM/httpdocs:/tmp:/ADDITIONAL/PATH" </IfModule> <IfModule mod_php5.c> php_admin_value open_basedir "/var/www/vhosts/YOURDOMAIN.COM/httpdocs:/tmp:/ADDITIONAL/PATH" </IfModule> </Directory>
Replace /ADDITIONAL/PATH
with a path you want added to the open_basedir
whitelist. You can add more, just separate them with colons (:
).
-
Reconfigure the webserver so
vhost.conf
will be applied./usr/local/psa/admin/sbin/httpdmng --reconfigure-domain YOURDOMAIN.COM
-
Restart Apache
/etc/init.d/httpd restart
-
Done! Check the value of
open_basedir
inphpinfo()
to see if it worked.