Forum Moderators: coopster
But everytime I try the script errors out. Is it possible that php 5 / Apache doesn't allow this?
I was able to find the sub folder by
$path = dirname(__FILE__);
$path = substr($path,0,strrpos($path,'httpdocs'));
$path = $path . 'private/info.php';
But if I try require, require_once, or include doesn't work.
This seems so simple, but after hours of working on the bigger project this seems to be kicking my butt.
Thanks for any help.
Ofie
The errors are:
The show.php file is the one I'm using to view info.php file with variables.
PHP Warning: include() [<a href='function.include'>function.include</a>]: open_basedir restriction in effect. File(/var/www/vhosts/thedomain.com/private/info.php) is not within the allowed path(s): (/var/www/vhosts/thedomain.com/httpdocs:/tmp) in /var/www/vhosts/thedomain.com/httpdocs/TEST/show.php on line 6
PHP Warning: include(/var/www/vhosts/thedomain.com/private/info.php) [<a href='function.include'>function.include</a>]: failed to open stream: Operation not permitted in /var/www/vhosts/thedomain.com/httpdocs/TEST/show.php on line 6
PHP Warning: include() [<a href='function.include'>function.include</a>]: Failed opening '/var/www/vhosts/thedomain.com/private/info.php' for inclusion (include_path='.:') in /var/www/vhosts/thedomain.com/httpdocs/TEST/show.php on line 6
I echo'd the path I created and is displayed correctly.
Thanks,
Ofie