Doing this to the function seems to fix it, but I'm sure this is an ugly hack.
function ss_get_mysql_stats( $options ) { # Process connection options. global $debug, $mysql_user, $mysql_pass, $cache_dir, $poll_time, $chk_options, $mysql_port, $mysql_ssl, $mysql_ssl_key, $mysql_ssl_cert, $mysql_ssl_ca, $heartbeat, $heartbeat_table, $heartbeat_server_id, $heartbeat_utc;
# If called from the script server, reparse the args if (!is_array($options)) { $options = parse_cmdline(func_get_args()); }
# Chech for the cnf files if ( file_exists('/etc/cacti/' . basename(__FILE__) . '.cnf' ) ) { require('/etc/cacti/' . basename(__FILE__) . '.cnf'); debug('Found configuration file /etc/cacti/' . basename(__FILE__) . '.cnf'); } elseif ( file_exists(__FILE__ . '.cnf' ) ) { require(__FILE__ . '.cnf'); debug('Found configuration file ' . __FILE__ . '.cnf'); }
$user = isset($options['user']) ? $options['user'] : $mysql_user; $pass = isset($options['pass']) ? $options['pass'] : $mysql_pass; $host = $options['host']; $port = isset($options['port']) ? $options['port'] : $mysql_port; $heartbeat_server_id = isset($options['server-id']) ? $options['server-id'] : $heartbeat_server_id;
Doing this to the function seems to fix it, but I'm sure this is an ugly hack.
function ss_get_mysql_stats( $options ) {
$mysql_ port, $mysql_ssl, $mysql_ssl_key, $mysql_ssl_cert, $mysql_ssl_ca,
$heartbeat, $heartbeat_table, $heartbeat_ server_ id, $heartbeat_utc;
# Process connection options.
global $debug, $mysql_user, $mysql_pass, $cache_dir, $poll_time, $chk_options,
# If called from the script server, reparse the args $options) ) { func_get_ args()) ;
if (!is_array(
$options = parse_cmdline(
}
# Chech for the cnf files '/etc/cacti/ ' . basename(__FILE__) . '.cnf' ) ) { '/etc/cacti/ ' . basename(__FILE__) . '.cnf'); __FILE_ _ . '.cnf' ) ) { __FILE_ _ . '.cnf');
if ( file_exists(
require(
debug('Found configuration file /etc/cacti/' . basename(__FILE__) . '.cnf');
}
elseif ( file_exists(
require(
debug('Found configuration file ' . __FILE__ . '.cnf');
}
$user = isset($ options[ 'user'] ) ? $options['user'] : $mysql_user; options[ 'pass'] ) ? $options['pass'] : $mysql_pass; options[ 'port'] ) ? $options['port'] : $mysql_port; server_ id = isset($ options[ 'server- id']) ? $options[ 'server- id'] : $heartbeat_ server_ id;
$pass = isset($
$host = $options['host'];
$port = isset($
$heartbeat_