$ 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
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
$ 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