From 5fcf3a4009ed1862fccf4b457651b749fead9c46 Mon Sep 17 00:00:00 2001 From: Junichi Satoh Date: Mon, 4 Apr 2022 16:22:25 +0900 Subject: [PATCH] Added support for FreeBSD in checkAllowOverrideEnabled(). --- pandora_console/include/class/ConsoleSupervisor.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/class/ConsoleSupervisor.php b/pandora_console/include/class/ConsoleSupervisor.php index 879192bd4d..767722931d 100644 --- a/pandora_console/include/class/ConsoleSupervisor.php +++ b/pandora_console/include/class/ConsoleSupervisor.php @@ -2532,10 +2532,18 @@ class ConsoleSupervisor global $config; $message = 'If AllowOverride is disabled, .htaccess will not works.'; - $message .= '
Please check /etc/httpd/conf/httpd.conf to resolve this problem.';
+	if (PHP_OS == 'FreeBSD') {
+	    $message .= '
Please check /usr/local/etc/apache24/httpd.conf to resolve this problem.';
+	} else {
+            $message .= '
Please check /etc/httpd/conf/httpd.conf to resolve this problem.';
+	}
 
         // Get content file.
-        $file = file_get_contents('/etc/httpd/conf/httpd.conf');
+	if (PHP_OS == 'FreeBSD') {
+	    $file = file_get_contents('/usr/local/etc/apache24/httpd.conf');
+	} else {
+            $file = file_get_contents('/etc/httpd/conf/httpd.conf');
+	}
         $file_lines = preg_split("#\r?\n#", $file, -1, PREG_SPLIT_NO_EMPTY);
         $is_none = false;