I have several sites on one server that all need to access the same .txt file using a TV. I’m using @File binding in a TV to form a drop down menu of several options. That way, I can update the one text file and it updates all the sites at the same time. Each site has it’s own root folder (separate domain names) but they all fall under the same client in my Apache setup.
Unfortunately, when I access the page in the manager to use the drop down menu, it doesn’t show up. Rather, I get an error message:
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/www/clients/clientX/webXX/web/designThemes/designThemes.txt) is not within the allowed path(s): (/var/www/clients/clientX/webXX/web:/var/www/clients/clientXX/webXX/tmp:/var/www/user1.DOMAINNAME.com/web:/srv/www/user1.DOMAINNAME.com/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin) in /var/www/clients/clientXX/webXX/web/manager/includes/tmplvars.commands.inc.php on line 116
Here’s what I have in my TV: @File /var/www/clients/clientX/webXX/web/designThemes/designThemes.txt
(Note: the capital X’s above are numbers - I just didn’t want to show that info in case it’s a security risk)
I can access this file if I change the file path to within the root of that particular website, but apparently modx won’t access it if it is outside the web root.
I’ve also tried the full URL (ie
http://mydomainname.com/path/to/file/designThemes.txt) but I get this error: Could not retrieve document ’
http://mydomainname.com/path/to/file/designThemes.txt’.
Please help!