Check_MK 1.5.0p7 pnp4nagios Json Problem

pnp4nagios

(Simon Baumbach) #1

Hello Community,
I hope not to be completely wrong here. If I ask for a short response.
When upgrading the existing Check_MK version 1.5.0p4 CRE to 1.5.0p7 CRE, our graphs will no longer be displayed. When calling a graph, I get the following error:

> _Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Services_JSON has a deprecated constructor in /opt/omd/versions/1.5.0p7.cre/share/pnp4nagios/htdocs/application/lib/json.php on line 115_
> 
> _Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Services_JSON_Error has a deprecated constructor in /opt/omd/versions/1.5.0p7.cre/share/pnp4nagios/htdocs/application/lib/json.php on line 781_
> 
> _Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Services_JSON_Error has a deprecated constructor in /opt/omd/versions/1.5.0p7.cre/share/pnp4nagios/htdocs/application/lib/json.php on line 795_

I have already reinstalled CMK and reinstalled all JSON packages.
Do you have any idea yet?
To the OS:
NAME=“Oracle Linux Server”
VERSION=“7.6”
ID=“ol”
VARIANT=“Server”
VARIANT_ID=“server”
VERSION_ID=“7.6”
PRETTY_NAME=“Oracle Linux Server 7.6”
ANSI_COLOR=“0;31”
CPE_NAME=“cpe:/o:oracle:linux:7:6:server”
HOME_URL=“https://linux.oracle.com/
BUG_REPORT_URL=“https://bugzilla.oracle.com/

ORACLE_BUGZILLA_PRODUCT=“Oracle Linux 7”
ORACLE_BUGZILLA_PRODUCT_VERSION=7.6
ORACLE_SUPPORT_PRODUCT=“Oracle Linux”
ORACLE_SUPPORT_PRODUCT_VERSION=7.6

OMD:
OMD - Open Monitoring Distribution Version 1.5.0p7.cre

With best regards
Simon


(Philipp Näther) #2

This looks like a case for the cmk devel team. Please report this issue as bug here https://mathias-kettner.com/bugs.php.

If you are willing to play around. Check the mentioned lines in the json.php and see if you can alter the constructors. Here is stated what the problem is http://php.net/manual/de/migration70.deprecated.php.

Maybe they forgot to fix this in the RHEL package after switching over to php7.

Could you upload you json.php here please? I will have a look into it and compare the lines to the SLES package I have here.


(Simon Baumbach) #3

json.txt (33.2 KB)

Hello Philipp Näther,
Thanks for the very fast response to my problem. I uploaded the json.php file once. Since the monitoring-port.org does not allow PHP files, I have changed these to a .txt. But with Notepadd ++ or vi that should not be a problem.
I would be glad if you could compare that with your SLES version. For example, I do not have this problem with SLES.

Thank you very much and best regards
Simon


(Philipp Näther) #4

Well the files look the same.
Can you check your ~/etc/apache/php.ini for the error_reporting value please?