| open basedir Cannot reach a dir |
henry0

msg:4497943 | 8:51 pm on Sep 20, 2012 (gmt 0) | I need to access from root /var/www/vhosts/aaaaaaa.com (fake DN for WebmasterWorld!) I do not understand why In php.ini open basedir is commented there is no ref to open basedir in httppd I have all access, SSH etc.. what could I do? I got: Warning: include() [function.include]: open_basedir restriction in effect. File(/var/www/vhosts/aaaaaa.com/test2.php) is not within the allowed path(s): (/var/www/vhosts/aaaaaa.com/httpdocs/:/tmp/) in /var/www/vhosts/aaaaaa.com/httpdocs/test.php on line 2
|
coopster

msg:4499342 | 1:44 pm on Sep 24, 2012 (gmt 0) | You need to add that path to your Apache configuration. HOWEVER! The "httpdocs" is likely already set as your root path (this looks like a Plesk configuration) so you probably will NOT want to be dropping included files in that lower level directory. You are better off creating a new directory and adding THAT to your open_basedir path. Something along these lines ...
<Directory /var/www/vhosts/@domain_name@/httpdocs> php_admin_flag engine on php_admin_value open_basedir "/var/www/vhosts/@domain_name@/httpdocs/:/tmp/:/var/www/vhosts/@domain_name@/my_includes/" </Directory>
Don't forget to restart the HTTP server for the configuration directives to take effect.
|
henry0

msg:4499385 | 3:46 pm on Sep 24, 2012 (gmt 0) | Thanks Coopster. I had added the dir already, but was not able to reach it adding your suggestion did it! (yes it is a PLESK) <edit> Forgot to mention</edit> I reach the dir from a config script using your: ini_set('include_path', realpath($_SERVER['DOCUMENT_ROOT'] . '/../any_dir/') . PATH_SEPARATOR . ini_get ('include_path')); include("aaaa.inc.php");
|
|
|