1 |
jpp |
1.1 |
diff -urN 4.0.1.orig/frontends/php/include/classes/core/CConfigFile.php 4.0.1/frontends/php/include/classes/core/CConfigFile.php |
2 |
|
|
--- 4.0.1.orig/frontends/php/include/classes/core/CConfigFile.php 2018-10-29 19:00:25.270221980 +0200 |
3 |
|
|
+++ 4.0.1/frontends/php/include/classes/core/CConfigFile.php 2018-10-29 19:00:54.666586770 +0200 |
4 |
|
|
@@ -24,7 +24,7 @@ |
5 |
|
|
const CONFIG_NOT_FOUND = 1; |
6 |
|
|
const CONFIG_ERROR = 2; |
7 |
|
|
|
8 |
|
|
- const CONFIG_FILE_PATH = '/conf/zabbix.conf.php'; |
9 |
|
|
+ const CONFIG_FILE_PATH = '/etc/zabbix/web/zabbix.conf.php'; |
10 |
|
|
|
11 |
|
|
private static $supported_db_types = [ |
12 |
|
|
ZBX_DB_DB2 => true, |
13 |
|
|
diff -urN 4.0.1.orig/frontends/php/include/classes/core/ZBase.php 4.0.1/frontends/php/include/classes/core/ZBase.php |
14 |
|
|
--- 4.0.1.orig/frontends/php/include/classes/core/ZBase.php 2018-10-29 19:00:25.270221980 +0200 |
15 |
|
|
+++ 4.0.1/frontends/php/include/classes/core/ZBase.php 2018-10-29 19:00:36.450360730 +0200 |
16 |
|
|
@@ -273,7 +273,7 @@ |
17 |
|
|
* @throws Exception |
18 |
|
|
*/ |
19 |
|
|
protected function setMaintenanceMode() { |
20 |
|
|
- require_once $this->getRootDir().'/conf/maintenance.inc.php'; |
21 |
|
|
+ require_once '/etc/zabbix/web/maintenance.inc.php'; |
22 |
|
|
|
23 |
|
|
if (defined('ZBX_DENY_GUI_ACCESS')) { |
24 |
|
|
$user_ip = (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && !empty($_SERVER['HTTP_X_FORWARDED_FOR'])) |
25 |
|
|
@@ -289,7 +289,7 @@ |
26 |
|
|
* Load zabbix config file. |
27 |
|
|
*/ |
28 |
|
|
protected function loadConfigFile() { |
29 |
|
|
- $configFile = $this->getRootDir().CConfigFile::CONFIG_FILE_PATH; |
30 |
|
|
+ $configFile = CConfigFile::CONFIG_FILE_PATH; |
31 |
|
|
$config = new CConfigFile($configFile); |
32 |
|
|
$this->config = $config->load(); |
33 |
|
|
} |
34 |
|
|
diff -urN 4.0.1.orig/frontends/php/include/classes/setup/CSetupWizard.php 4.0.1/frontends/php/include/classes/setup/CSetupWizard.php |
35 |
|
|
--- 4.0.1.orig/frontends/php/include/classes/setup/CSetupWizard.php 2018-10-29 19:00:25.274222030 +0200 |
36 |
|
|
+++ 4.0.1/frontends/php/include/classes/setup/CSetupWizard.php 2018-10-29 19:00:36.450360730 +0200 |
37 |
|
|
@@ -333,7 +333,7 @@ |
38 |
|
|
function stage5() { |
39 |
|
|
$this->setConfig('ZBX_CONFIG_FILE_CORRECT', true); |
40 |
|
|
|
41 |
|
|
- $config_file_name = Z::getInstance()->getRootDir().CConfigFile::CONFIG_FILE_PATH; |
42 |
|
|
+ $config_file_name = CConfigFile::CONFIG_FILE_PATH; |
43 |
|
|
$config = new CConfigFile($config_file_name); |
44 |
|
|
$config->config = [ |
45 |
|
|
'DB' => [ |
46 |
|
|
@@ -502,7 +502,7 @@ |
47 |
|
|
// make zabbix.conf.php downloadable |
48 |
|
|
header('Content-Type: application/x-httpd-php'); |
49 |
|
|
header('Content-Disposition: attachment; filename="'.basename(CConfigFile::CONFIG_FILE_PATH).'"'); |
50 |
|
|
- $config = new CConfigFile(Z::getInstance()->getRootDir().CConfigFile::CONFIG_FILE_PATH); |
51 |
|
|
+ $config = new CConfigFile(CConfigFile::CONFIG_FILE_PATH); |
52 |
|
|
$config->config = [ |
53 |
|
|
'DB' => [ |
54 |
|
|
'TYPE' => $this->getConfig('DB_TYPE'), |