Page 1 of 1
PHP Version 7
Posted: Tue Aug 15, 2017 4:15 pm
by SteveBeauchemin
Does Nagios XI work properly on Red Hat 7 upgraded to use PHP 7?
Please advise...
Thanks
Steve B
Re: PHP Version 7
Posted: Tue Aug 15, 2017 4:34 pm
by dwhitfield
No. We are still working on the mysql connection. This has been a hot topic recently. If you are able to get it to work, your steps would be hugely appreciated.
The sourceguardian of things is ready to go for PHP7 in the latest version, so it will just take the right person with the development/admin skills to make it happen. Since Red Hat backports security fixes, it's not a particularly high priority at the moment. If there's a CVE Red Hat is not patching for whatever reason, please let us know and we can prioritize getting XI working with PHP 7.
Re: PHP Version 7
Posted: Wed Aug 16, 2017 9:28 am
by SteveBeauchemin
I converted to php 7 on my home server. Centos 7. And guess what - I found that my web application stopped working properly because of the syntax used to interact with mysql. Once I changed the syntax, the code started working again. So I have lived thru this.
I'll dig that information up when I get home tonight and provide my notes tomorrow.
Steve B
Re: PHP Version 7
Posted: Wed Aug 16, 2017 9:54 am
by dwhitfield
SteveBeauchemin wrote:
I'll dig that information up when I get home tonight and provide my notes tomorrow.
Thanks!
Re: PHP Version 7
Posted: Wed Aug 16, 2017 11:18 am
by jomann
Currently we resolved two problems with PHP 7+ and deprecated functions. Some were removed in 5.4.8 in order to make XI work in general and there were some more removed functions that were used by the CCM that we removed in 5.4.9 (which isn't out yet) but we are in the process of making it work with PHP 7+ although we recommend using the default system's PHP version if possible.
It also looks like the pear module, /usr/share/pear/HTML/Template/IT.php requires an update on line 1091 (you may need to run pear install HTML_Template_IT)
Code: Select all
return preg_replace_callback(
"#<!-- INCLUDE (.*) -->#im",
function ($m) { $this->getFile($m[1]); },
$content
);