PNP4Nagios data.php [270] error

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
jesseg
Posts: 3
Joined: Wed Mar 20, 2019 8:07 am

PNP4Nagios data.php [270] error

Post by jesseg »

Fresh install, all tests passed on the install.php page. When I remove it, I get this below which should be the localhost ping chart. Any ideas?

PNP4Nagios Version 0.6.26
Please check the documentation for information about the following error.

Call to undefined function simplexml_load_file()
file [line]:

application/models/data.php [270]:

------------------------------------------------------

Install.php output:
PNP4Nagios Environment Tests

The following options are determined by "configure". If any of the tests have failed, consult the documentation for more information on how to correct the problem.
PNP4Nagios Version pnp4nagios-0.6.26
Prefix /usr/local/pnp4nagios
Configure Arguments ./configure '--with-httpd-conf=/etc/apache2/sites-enabled'
RRD Storage /usr/local/pnp4nagios/var/perfdata is readable.
RRDtool Binary /usr/bin/rrdtool is executable by PHP
PHP GD extension Pass
PHP function proc_open() Pass
PHP zlib extension Pass
PHP session extension Pass
PHP JSON extension Pass
PHP magic_quotes_gpc Off
PHP socket extension Pass
Apache Rewrite Module Pass
Kohana Environment Tests

The following tests have been run to determine if Kohana will work in your environment. If any of the tests have failed, consult the documentation for more information on how to correct the problem.
PHP Version 7.2.15-0ubuntu0.18.04.1
System Directory /usr/local/pnp4nagios/lib/kohana/system/
Application Directory /usr/local/pnp4nagios/share/application/
Reflection Enabled Pass
Iconv Extension Loaded Pass
URI Determination Pass

Your environment passed all requirements. Remove or rename the /usr/local/pnp4nagios/share/install.php file now.
jesseg
Posts: 3
Joined: Wed Mar 20, 2019 8:07 am

Re: PNP4Nagios data.php [270] error

Post by jesseg »

Already fixed that one with
apt install php7.2-xml

Then fixed this error:
application/models/data.php [979]:

Ubuntu 18.04 php 7.2

solution:
edit
if(sizeof($pages) > 0 ){
to
if(is_array($pages) && sizeof($pages) > 0 ){

Hope this helps someone else. Thanks for the great forum!
Last edited by jesseg on Wed Mar 20, 2019 10:45 am, edited 1 time in total.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: PNP4Nagios data.php [270] error

Post by benjaminsmith »

Hi @jesseg,
Hope this helps someone else. Thanks for the great forum!
Thanks for following up with the solution! Did you have any other questions or shall I lock this one up?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
jesseg
Posts: 3
Joined: Wed Mar 20, 2019 8:07 am

Re: PNP4Nagios data.php [270] error

Post by jesseg »

Close it, thanks! Edit was to fix typo in the word array.
Locked