Can't include files after moving from CPanel to Plesk
I have a base set of files that are included from lots of other files. This saves me having to update lots of files when I made changes开发者_StackOverflow. The issues is, in CPanel my directory structure was:
Base: domain/public_html/base_data
Subdomain: domain/public_html/subdomain
This meant I could just go back one directory and include the file. Now that I have moved to Plesk it is like this:
Base: domain/httpdocs/base_data
Subdomain: domain/subdomains/subdomain/httpdocs/
The problem with this is none of my includes work when I ../../
out of my current sub domain into the base_data one.
Anyone have any ideas how to fix this?
EDIT: Just turned error reporting on and got this open_basedir restriction in effect. File(/var/www/vhosts/domain.com/httpdocs/base_data/index.php) is not within the allowed path(s): (/var/www/vhosts/domain.com/subdomains/rip/httpdocs:/tmp) in /var/www/vhosts/domain.com/subdomains/rip/httpdocs/index.php on line 14
Yes use ABSOLUTE path.
you can make a $yourLibPath = 'domain/httpdocs/base_data/';
And then include all your libs using this var:
include($yourLibPath.'time.lib.php');
Managed to sort this out by overriding the open_basedir path in a vhost.conf file.
精彩评论