So, I'm fairly confident that I need to add something to the allowed paths in the ini_set line in the code attached, but honestly, these kinds of settings are a weak point.... Anyway, I'm receiving this error in my logs when trying to access http://mydomain.com/companyb/pto/login.php:
PHP Warning: include() [<a href='function.include'>function.include</a>]: open_basedir restriction in effect. File(/companyb/includes/configs/startup.php) is not within the allowed path(s): (/var/www/vhosts/mydomain.com/httpdocs:/tmp:/usr/lib/php/Smarty:/usr/share/pear) in /var/www/vhosts/mydomain.com/httpdocs/companyb/pto/login.php on line 2, referer: http://mydomain.com/companyb/
And, I think I need to add something to the ini_set line in my startup config file (attached below... I'm not messing with php.ini directly). But, I tried changing it to:
ini_set('include_path', ABS_SERVER . $path_delimiter . ABS_SERVER . 'includes/' . $path_delimiter . ABS_SERVER . 'classes/' . $path_delimiter . ABS_SERVER . pto/' . $path_delimiter);
But that didn't seem to work. Help?
$path_delimiter = ":";
define('ABS_SERVER', '/var/www/vhosts/mydomain.com/httpdocs/companyb/');
ini_set('include_path', ABS_SERVER . $path_delimiter . ABS_SERVER . 'includes/' . $path_delimiter . ABS_SERVER . 'classes/' . $path_delimiter);
include_once('classes/class.session.php');
require( 'Smarty/libs/Smarty.class.php');
$smarty = new Smarty();
$smarty->template_dir = ABS_SERVER . 'smarty/templates';
$smarty->compile_dir = ABS_SERVER . 'smarty/templates_c';
$smarty->cache_dir = ABS_SERVER . 'smarty/cache';
$smarty->config_dir = ABS_SERVER . 'smarty/configs';
$session = new Session;
$smarty->assign('usersession', $session);