1 --- cacti-0.8.7b/include/global.php 2008-10-05 04:38:29.740276226 +0300
2 +++ cacti-0.8.7g/include/global.php 2010-12-13 12:10:44.312310245 +0200
4 $cacti_session_name = "Cacti";
6 /* Include configuration */
7 -include(dirname(__FILE__) . "/config.php");
8 +require '/etc/webapps/cacti/config.php';
10 if (isset($config["cacti_version"])) {
11 die("Invalid include/config.php file detected.");
13 $config["base_path"] = strtr(ereg_replace("(.*)[\/\\]include", "\\1", dirname(__FILE__)), "\\", "/");
14 $config["library_path"] = ereg_replace("(.*[\/\\])include", "\\1lib", dirname(__FILE__));
15 $config["include_path"] = dirname(__FILE__);
16 -$config["rra_path"] = $config["base_path"] . '/rra';
17 +$config["rra_path"] = '/var/lib/cacti/rra';
18 +$config["log_path"] = '/var/log/cacti';
21 $colors["dark_outline"] = "454E53";
22 --- cacti-0.8.7g/include/config.php~ 2010-12-13 12:15:08.000000000 +0200
23 +++ cacti-0.8.7g/include/config.php 2010-12-13 12:16:09.275611204 +0200
25 $database_type = "mysql";
26 $database_default = "cacti";
27 $database_hostname = "localhost";
28 -$database_username = "cactiuser";
29 -$database_password = "cactiuser";
30 +$database_username = "mysql";
31 +$database_password = "";
32 $database_port = "3306";
34 /* load up old style plugins here */
36 /* Default session name - Session name must contain alpha characters */
37 #$cacti_session_name = "Cacti";
39 +$url_path = '/cacti/';
42 --- cacti-0.8.7b/include/global_settings.php~ 2008-10-05 04:29:33.121404239 +0300
43 +++ cacti-0.8.7b/include/global_settings.php 2008-10-05 04:41:11.807395633 +0300
45 "friendly_name" => "Cacti Log File Path",
46 "description" => "The path to your Cacti log file (if blank, defaults to <path_cacti>/log/cacti.log)",
47 "method" => "filepath",
48 - "default" => $config["base_path"] . "/log/cacti.log",
49 + "default" => $config["log_path"] . "/cacti.log",
52 "pollerpaths_header" => array(
53 --- cacti-0.8.7b/install/index.php~ 2008-10-05 04:29:33.113733438 +0300
54 +++ cacti-0.8.7b/install/index.php 2008-10-05 04:41:37.276839747 +0300
56 if (config_value_exists("path_cactilog")) {
57 $input["path_cactilog"]["default"] = read_config_option("path_cactilog");
59 - $input["path_cactilog"]["default"] = $config["base_path"] . "/log/cacti.log";
60 + $input["path_cactilog"]["default"] = $config["log_path"] . "/cacti.log";
64 --- cacti-0.8.7b/lib/functions.php~ 2008-10-05 04:29:33.124737562 +0300
65 +++ cacti-0.8.7b/lib/functions.php 2008-10-05 04:42:05.046758504 +0300
68 if ((($logdestination == 1) || ($logdestination == 2)) && (read_config_option("log_verbosity") != POLLER_VERBOSITY_NONE)) {
70 - $logfile = $config["base_path"] . "/log/cacti.log";
71 + $logfile = $config["log_path"] . "/cacti.log";
74 /* echo the data to the log (append) */
75 --- cacti-0.8.8/utilities.php~ 2012-10-29 22:14:05.000000000 +0200
76 +++ cacti-0.8.8/utilities.php 2012-10-29 22:15:05.781005237 +0200
77 @@ -773,12 +773,12 @@ function utilities_clear_user_log() {
80 function utilities_view_logfile() {
81 - global $log_tail_lines, $page_refresh_interval, $refresh;
82 + global $log_tail_lines, $page_refresh_interval, $refresh, $config;
84 $logfile = read_config_option("path_cactilog");
87 - $logfile = "./log/rrd.log";
88 + $logfile = $config['log_path']. "/rrd.log";
91 /* helps determine output color */
92 @@ -1014,6 +1014,7 @@ function utilities_view_logfile() {
95 function utilities_clear_logfile() {
97 load_current_session_value("refresh", "sess_logfile_refresh", read_config_option("log_refresh_interval"));
99 $refresh["seconds"] = get_request_var_request("refresh");
101 $logfile = read_config_option("path_cactilog");
103 if ($logfile == "") {
104 - $logfile = "./log/cacti.log";
105 + $logfile = $config['log_path']."/cacti.log";
108 html_start_box("<strong>Clear Cacti Log File</strong>", "100%", $colors["header"], "1", "center", "");
109 --- cacti/poller.php~ 2008-10-05 05:08:10.000000000 +0300
110 +++ cacti/poller.php 2008-10-05 05:11:11.327705168 +0300
115 +-------------------------------------------------------------------------+
117 $no_http_headers = true;
119 /* start initialization section */
120 -include(dirname(__FILE__) . "/include/global.php");
121 +require "/usr/share/cacti/include/global.php";
122 include_once($config["base_path"] . "/lib/poller.php");
123 include_once($config["base_path"] . "/lib/data_query.php");
124 include_once($config["base_path"] . "/lib/graph_export.php");