From cd1e03c033a6505c64b162c7dde481c6a11c2cbd Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Wed, 10 Jun 2015 15:31:15 +0200 Subject: [PATCH] fix openbasedir-path when using mod_php, fixes #1507 Signed-off-by: Michael Kaufmann (d00p) --- scripts/jobs/cron_tasks.inc.http.10.apache.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/jobs/cron_tasks.inc.http.10.apache.php b/scripts/jobs/cron_tasks.inc.http.10.apache.php index 9d6887b9..d186ff5f 100644 --- a/scripts/jobs/cron_tasks.inc.http.10.apache.php +++ b/scripts/jobs/cron_tasks.inc.http.10.apache.php @@ -392,8 +392,16 @@ class apache { if ($domain['phpenabled'] == '1') { // This vHost has PHP enabled and we are using the regular mod_php - if ($domain['openbasedir'] == '1') { - $_phpappendopenbasedir = appendOpenBasedirPath($domain['customerroot'], true); + if ($domain['openbasedir'] == '1') + { + if ($domain['openbasedir_path'] == '1' || strstr($domain['documentroot'], ":") !== false) + { + $_phpappendopenbasedir = appendOpenBasedirPath($domain['customerroot'], true); + } + else + { + $_phpappendopenbasedir = appendOpenBasedirPath($domain['documentroot'], true); + } $_custom_openbasedir = explode(':', Settings::Get('system.phpappendopenbasedir')); foreach ($_custom_openbasedir as $cobd) {