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
3 @@ -83,13 +83,7 @@ $disable_log_rotation = false;
4 ini_set('max_input_vars', '5000');
7 -/* Include configuration, or use the defaults */
8 -if (file_exists(dirname(__FILE__) . '/config.php')) {
9 - if (!is_readable(dirname(__FILE__) . '/config.php')) {
10 - die('Configuration file include/config.php is present, but unreadable.' . PHP_EOL);
12 - include(dirname(__FILE__) . '/config.php');
14 +require '/etc/webapps/cacti/config.php';
16 if (isset($config['cacti_version'])) {
17 die('Invalid include/config.php file detected.' . PHP_EOL);
18 @@ -139,7 +139,8 @@ if ($config['cacti_server_os'] == 'win32
19 $config['library_path'] = preg_replace("/(.*[\/])include/", "\\1lib", dirname(__FILE__));
21 $config['include_path'] = dirname(__FILE__);
22 -$config['rra_path'] = $config['base_path'] . '/rra';
23 +$config["rra_path"] = '/var/lib/cacti/rra';
24 +$config["path_cactilog"] = '/var/log/cacti/cacti.log';
26 /* for multiple pollers, we need to know this location */
27 if (!isset($scripts_path)) {
28 --- cacti-0.8.7g/include/config.php~ 2010-12-13 12:15:08.000000000 +0200
29 +++ cacti-0.8.7g/include/config.php 2010-12-13 12:16:09.275611204 +0200
31 $database_type = 'mysql';
32 $database_default = 'cacti';
33 $database_hostname = 'localhost';
34 -$database_username = 'cactiuser';
35 -$database_password = 'cactiuser';
36 +$database_username = 'mysql';
37 +$database_password = '';
38 $database_port = '3306';
39 $database_ssl = false;
41 --- cacti/poller.php~ 2017-08-28 05:48:36.000000000 +0200
42 +++ cacti/poller.php 2017-08-31 08:39:19.780902180 +0200
44 /* tick use required as of PHP 4.3.0 to accomodate signal handling */
47 -require(__DIR__ . '/include/cli_check.php');
48 +require('/usr/share/cacti/include/cli_check.php');
49 require_once($config['base_path'] . '/lib/poller.php');
50 require_once($config['base_path'] . '/lib/data_query.php');
51 require_once($config['base_path'] . '/lib/rrd.php');
53 diff -ur cacti-1.2.6.org/install/functions.php cacti-1.2.6/install/functions.php
54 --- cacti-1.2.6.org/install/functions.php 2019-09-02 10:23:43.000000000 +0200
55 +++ cacti-1.2.6/install/functions.php 2019-09-26 11:19:59.780907049 +0200
59 $logfile = 'install' . '-' . $section;
60 - file_put_contents($config['base_path'] . '/log/' . $logfile . '.log', sprintf($format_log1, $day, $time, $levelname, $data, PHP_EOL), $flags);
61 - file_put_contents($config['base_path'] . '/log/install-complete.log', sprintf($format_log2, $day, $time, $sectionname, $levelname, $data, PHP_EOL), $flags);
62 + file_put_contents('/var/log/cacti/' . $logfile . '.log', sprintf($format_log1, $day, $time, $levelname, $data, PHP_EOL), $flags);
63 + file_put_contents('/var/log/cacti/install-complete.log', sprintf($format_log2, $day, $time, $sectionname, $levelname, $data, PHP_EOL), $flags);
67 diff -ur cacti-1.2.6.org/lib/installer.php cacti-1.2.6/lib/installer.php
68 --- cacti-1.2.6.org/lib/installer.php 2019-09-02 10:23:43.000000000 +0200
69 +++ cacti-1.2.6/lib/installer.php 2019-09-26 11:20:54.749208954 +0200
72 $always_paths = array(
74 - $config['base_path'] . '/log',
75 $config['base_path'] . '/cache/boost',
76 $config['base_path'] . '/cache/mibcache',
77 $config['base_path'] . '/cache/realtime',
82 - $logcontents = tail_file($config['base_path'] . '/log/cacti.log', 100, -1, ' INSTALL:' , $page_nr, $total_rows);
83 + $logcontents = tail_file('/var/log/cacti/cacti.log', 100, -1, ' INSTALL:' , $page_nr, $total_rows);
86 foreach ($logcontents as $logline) {