I have a library of php files that I would like to use in several web sites.
I thus have several directories, one for each web site, containing the different web sites files.
The directories look like this:
or like this
I would like to avoid ducplicating the library of php files in these different web sites directories.
I would prefer to keep only one copy of these library php files on the server.
The server is a dedicated server.
The library is sitting in the directory
but it could sit anywhere on the server file system.
I tried to use ymbolic links to have the lib/ directory present in the other directories.
Also, the open_basedir in the php.ini file is empty:
But when accessing the web site I get this message:
Warning: Unknown(): open_basedir restriction in effect. File(/home/httpd/vhosts/thalasoft.net/httpdocs/engine/index.php) is not within the allowed path(s): (/home/httpd/vhosts/thalasoft.net/subdomains/demo/httpdocs:/tmp) in Unknown on line 0
Warning: Unknown(/home/httpd/vhosts/thalasoft.net/httpdocs/engine/index.php): failed to open stream: Opération non permise in Unknown on line 0
Warning: (null)(): Failed opening '/home/httpd/vhosts/thalasoft.net/httpdocs/engine/index.php' for inclusion (include_path=':/home/httpd/vhosts/thalasoft.net/httpdocs/engine/setup') in Unknown on line 0
How to include php files that are not sitting in the document root of a web site?