Page 1 of 1

PNP4Nagios data.php [270] error

Posted: Wed Mar 20, 2019 8:14 am
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.

Re: PNP4Nagios data.php [270] error

Posted: Wed Mar 20, 2019 8:57 am
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!

Re: PNP4Nagios data.php [270] error

Posted: Wed Mar 20, 2019 10:39 am
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?

Re: PNP4Nagios data.php [270] error

Posted: Wed Mar 20, 2019 10:46 am
by jesseg
Close it, thanks! Edit was to fix typo in the word array.