Php error message on "Host and Services Status" pages

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
evisus
Posts: 82
Joined: Tue Apr 26, 2016 1:19 pm

Php error message on "Host and Services Status" pages

Post by evisus »

Hi.

I have updated a nagios XI version 2012R2.4 installed in a Centos 6.8, the update has been passing version by version until reaching Nagios XI 5.3.3. So far everything looks fine, there is only one php error message in the host and services status pages and in the apache error log:

"Undefined variable: url_target in /usr/local/nagiosxi/html/includes/utilsl.inc.php"

I will appreciate your help in identifying the problem.

Attached image

Data:
-General 6.8
-Php Version: 5.3.3
-Apache 2.2.15
-Mysql 14.14 Distrib 5.1.69
-postgres 8.4.13

Thank you
You do not have the required permissions to view the files attached to this post.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Php error message on "Host and Services Status" pages

Post by mcapra »

My best guess is that the message about enterprise license expiration is trying to be displayed, but causing an error for some reason. If you aren't noticing any issues, it's probably just a visual glitch.

I would re-download the latest XI tarball and pull the nagiosxi/basedir/html/includes/utilsl.inc.php file out and replace the corresponding file on your XI installation (/usr/local/nagiosxi/html/includes/utilsl.inc.php). Just in-case that file was missed in the upgrade process for some reason. Be sure to backup the original file before doing this.
Former Nagios employee
https://www.mcapra.com/
evisus
Posts: 82
Joined: Tue Apr 26, 2016 1:19 pm

Re: Php error message on "Host and Services Status" pages

Post by evisus »

thanks for your reply.

I have backed and replaced the php files and the error persists.

Will there be another cause?
evisus
Posts: 82
Joined: Tue Apr 26, 2016 1:19 pm

Re: Php error message on "Host and Services Status" pages

Post by evisus »

A detail I have not mentioned:

The original installation is a vmware appliance, Nagios has been updated offline, the server does not have internet access
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Php error message on "Host and Services Status" pages

Post by ssax »

Please run this command and send me the resulting /tmp/files.zip:

Code: Select all

zip -r /tmp/files.zip /etc/httpd/conf/httpd.conf /etc/php.ini /usr/local/nagiosxi/html/includes/db.inc.php
Thank you
evisus
Posts: 82
Joined: Tue Apr 26, 2016 1:19 pm

Re: Php error message on "Host and Services Status" pages

Post by evisus »

attach the file

Thanks
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Php error message on "Host and Services Status" pages

Post by ssax »

Please send me the output of this command:

Code: Select all

php -r 'phpinfo();' | grep error
evisus
Posts: 82
Joined: Tue Apr 26, 2016 1:19 pm

Re: Php error message on "Host and Services Status" pages

Post by evisus »

Hi!!

this is the result

Code: Select all

display_errors=> STDOUT => STDOUT
display_startup_errors => Off => Off
error_append_string => no value => no value
error_log => no value => no value
error_prepend_string => no value => no value
error_reporting => 22527 => 22527
html_errors => Off => Off
ignore_repeated_errors => Of => Off
log_errors => On => On
Log_errors_max_len => 1024 => 1024
track_errors => Off => Off
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
mssql.min_error_severety => 10 => 10
Thanks
Last edited by dwhitfield on Tue Nov 29, 2016 6:00 pm, edited 1 time in total.
Reason: code blocks FTW
evisus
Posts: 82
Joined: Tue Apr 26, 2016 1:19 pm

Re: Php error message on "Host and Services Status" pages

Post by evisus »

I will appreciate your help.
evisus
Posts: 82
Joined: Tue Apr 26, 2016 1:19 pm

Re: Php error message on "Host and Services Status" pages

Post by evisus »

I have encountered other php errors like:

SNMP Wizard page:
"Warning: base64_decode () expects parameter 1 to be string, array given in /usr/local/nagiosxi/html/includes/utilsl.inc.php on line 3450"

On the "Operation Center" page when selecting a group:
"Notice: Undefined variable: host_ids in /usr/local/nagiosxi/html/includes/components/nocscreen/nocscreenapi.php on line 333 Warning: Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/nocscreen/nocscreenapi.php on line 333 Notice: Undefined variable: host_ids_str in /usr/local/nagiosxi/html/includes/components/nocscreen/nocscreenapi.php on line 343 Notice: Undefined variable: host_ids_str in /usr/local/nagiosxi/html/includes/components/nocscreen/nocscreenapi.php on line 437

Notice: Undefined variable: host_ids in /usr/local/nagiosxi/html/includes/components/nocscreen/nocscreenapi.php on line 146 Warning: Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/nocscreen/nocscreenapi.php on line 146 Notice: Undefined variable: host_ids_str in /usr/local/nagiosxi/html/includes/components/nocscreen/nocscreenapi.php on line 156
"

I will really be grateful for your support.
Locked