asuknath / Nagios-Status-JSON

Nagios Status JSON
26 stars 19 forks source link

tag=login Causes 500 Internal server error #22

Open tomwimmenhove opened 3 years ago

tomwimmenhove commented 3 years ago

$ php-cgi nath_status.php -r tag=login url_nagios=blabla PHP Notice: Undefined variable: url_nagios in /usr/local/nagios/share/nath_status.php on line 31 PHP Fatal error: Uncaught Error: Call to undefined function json_encode() in /usr/local/nagios/share/nath_status.php:34 Stack trace:

0 {main}

thrown in /usr/local/nagios/share/nath_status.php on line 34 Status: 500 Internal Server Error X-Powered-By: PHP/7.2.24 Content-type: text/html; charset=UTF-8

turf212 commented 3 years ago

If you haven't already found the issue, I suspect that you need to php json package installed for the version of php on your server. In ubuntu this would be php7.2-json