Undefined variable: strVIValues in /usr/local/nagiosxi/html/includes/components/ccm/classes/config.class.php line 1400
Posted: Tue Oct 08, 2024 8:20 am
Hi support team,
We use Nagios XI 2024R1.2.1 2024R1.2.2. On both versions we see the error "Undefined variable: strVIValues in /usr/local/nagiosxi/html/includes/components/ccm/classes/config.class.php on line 1400" after an apply configuration.
After looking at the code of config.class.php I didn't see something wrong at the given line, but I noticed some other things. I did not experience an issue with these findings. I think the code is a little bit wrong at some points, but your developers should verify this of course. It is regarding the concatenation of the variable strVIValues.
# wrong line 990, line needs "." before "="
$strVIValues = "host_notifications_enabled,service_notifications_enabled,can_submit_commands,retain_status_information,";
$strVIValues = "retain_nonstatus_information";
# wrong line 1005, line need "." before "="
$strVIValues = "host_notifications_enabled,service_notifications_enabled,can_submit_commands,retain_status_information,";
$strVIValues = "retain_nonstatus_information";
# possible wrong line 1379, first line should not have ".=" but "="
$strVIValues .= "active_checks_enabled,passive_checks_enabled,check_freshness,obsess_over_host,event_handler_enabled,";
$strVIValues .= "flap_detection_enabled,process_perf_data,retain_status_information,retain_nonstatus_information,";
$strVIValues .= "notifications_enabled";
# possible wrong line 1400, first line should not have ".=" but "=", this line gives the initial error
$strVIValues .= "is_volatile,active_checks_enabled,passive_checks_enabled,parallelize_check,obsess_over_service,";
$strVIValues .= "check_freshness,event_handler_enabled,flap_detection_enabled,process_perf_data,retain_status_information,";
$strVIValues .= "retain_nonstatus_information,notifications_enabled";
I hope you agree with what I have found, and maybe it will solve the initial error.
w.k.r.,
Humphrey
We use Nagios XI 2024R1.2.1 2024R1.2.2. On both versions we see the error "Undefined variable: strVIValues in /usr/local/nagiosxi/html/includes/components/ccm/classes/config.class.php on line 1400" after an apply configuration.
After looking at the code of config.class.php I didn't see something wrong at the given line, but I noticed some other things. I did not experience an issue with these findings. I think the code is a little bit wrong at some points, but your developers should verify this of course. It is regarding the concatenation of the variable strVIValues.
# wrong line 990, line needs "." before "="
$strVIValues = "host_notifications_enabled,service_notifications_enabled,can_submit_commands,retain_status_information,";
$strVIValues = "retain_nonstatus_information";
# wrong line 1005, line need "." before "="
$strVIValues = "host_notifications_enabled,service_notifications_enabled,can_submit_commands,retain_status_information,";
$strVIValues = "retain_nonstatus_information";
# possible wrong line 1379, first line should not have ".=" but "="
$strVIValues .= "active_checks_enabled,passive_checks_enabled,check_freshness,obsess_over_host,event_handler_enabled,";
$strVIValues .= "flap_detection_enabled,process_perf_data,retain_status_information,retain_nonstatus_information,";
$strVIValues .= "notifications_enabled";
# possible wrong line 1400, first line should not have ".=" but "=", this line gives the initial error
$strVIValues .= "is_volatile,active_checks_enabled,passive_checks_enabled,parallelize_check,obsess_over_service,";
$strVIValues .= "check_freshness,event_handler_enabled,flap_detection_enabled,process_perf_data,retain_status_information,";
$strVIValues .= "retain_nonstatus_information,notifications_enabled";
I hope you agree with what I have found, and maybe it will solve the initial error.
w.k.r.,
Humphrey