Nagios XI - Configure PHP Development Environment


If you are going to develop addons for Nagiox XI you will need your PHP environment configured to help you with this. This document describes some setting to help you configure your environment to extend Nagios XI with PHP.



Editing Files

In many steps of this article you will be required to edit files. This documentation will use the vi text editor. When using the vi

  • To make changes press i on the keyboard first to enter insert mode
  • Press Esc to exit insert mode
  • When you have finished, save the changes in vi by typing :wq and press Enter




When developing with PHP you will want to turn on some additional error reporting usually turned off. These changes need to be made to your php.ini file, to determine the location of this file execute the following command:

find /etc -name php.ini

If there are multiple results then the one in the apache directory is the one that needs changing.


Edit the file and make the following changes:

error_reporting = E_ALL
display_errors = On
ignore_repeated_errors = On


Once these changes are made you will have to restart apache for the changes to take effect using one of the commands below:


RHEL 7 | CentOS 7 | Oracle Linux 7

systemctl restart httpd.service


Debian | Ubuntu 16/18

systemctl restart apache2.service


You could also log php error to syslog and use Nagios Log server to monitor/capture your php errors.



Other PHP Resources

PHP php.ini documentation



Final Thoughts

For any support related questions please visit the Nagios Support Forums at:

Posted by: - Mon, Feb 2, 2015 at 5:53 PM. This article has been viewed 4941 times.
Online URL:

Powered by PHPKB (Knowledge Base Software)