Oreon (Centreon) issue with php pear

It appears in some cases, for some pieces of software (anyone said “open source and poorly documented?”) that every installation has its own quirks and issues. It seems that following the same pattern is not always enough. It can be caused by the day you have selected to download and use the external component which the software you are to install requires, or it can be caused by some mysterious configuration which you neglected to check, and should have had no relevance to the software you are to install whatsoever – but fate has it you are facing an issue you have never seen before, or an issue you did not expect to find.

Installing Oreon today had the same result – a minor thing didn’t work. Cause? Unknown…

When you use the software – a nice web system for configuring and viewing Nagios alerts (as Nagios itself is rather complicated to manage), you get on the top of some of the pages a wierd text – “PHP_EOLPHP_EOL” and so on.

PHP Pear should have had a constant named PHP_EOL which defines the way to terminate a line. In this case, it was undefined, and caused javascripts to fail to work.

The (ugly hack) solution I used was to find the oreon.conf.php file and add to it, at the bottom, the following lines:

if (!defined(‘PHP_EOL’)) {
define(‘PHP_EOL’, “n”);
}

Worked like a charm. FYI.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.