Nagios unable to get version after Apache and PHP Upgrade
Nagios unable to get version after Apache and PHP Upgrade
Hello,
Due to a compliance issue we had to upgrade apache and PHP. I was able to get Nagios functioning again afterwards, however it now no longer gets the version.
The main page shows : Unable to get Process Status
The Check for upgrade page shows: Your installation of Nagios Core <?php echo $this_version; ?> is outdated and should be upgraded.
I'm running PHP version 5.4.16
I'm running Apache version 2.4.29
Thanks!!
Due to a compliance issue we had to upgrade apache and PHP. I was able to get Nagios functioning again afterwards, however it now no longer gets the version.
The main page shows : Unable to get Process Status
The Check for upgrade page shows: Your installation of Nagios Core <?php echo $this_version; ?> is outdated and should be upgraded.
I'm running PHP version 5.4.16
I'm running Apache version 2.4.29
Thanks!!
Re: Nagios unable to get version after Apache and PHP Upgrad
I've since upgraded to PHP 7.2.3. Nagios still runs fine, but the same version error exists.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios unable to get version after Apache and PHP Upgrad
this appears that php is not enabled in the apache you have installed
Depending on your OS you likely need to install mod-php for apache
something like this
Then restart apache
Depending on your OS you likely need to install mod-php for apache
something like this
Code: Select all
sudo apt install apache2 libapache2-mod-php7.2
Re: Nagios unable to get version after Apache and PHP Upgrad
Thanks! Would you happen to know what the yum packages are for CentOS 7? I'll investigate on my own as well.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios unable to get version after Apache and PHP Upgrad
it may depend on the repo you installed out of.
could be mod_php72w in webtatic, but also depends on if you used fpm or not....
Here's the article as this isn't Nagios specific
https://webtatic.com/packages/php72/
could be mod_php72w in webtatic, but also depends on if you used fpm or not....
Here's the article as this isn't Nagios specific
https://webtatic.com/packages/php72/
Re: Nagios unable to get version after Apache and PHP Upgrad
It's a remi repo, so looks like php72-php according to this: https://blog.remirepo.net/post/2017/04/ ... Collection
Now to figure out how to unload php7_module and load only the 72 module.
I post when I solve it.
Now to figure out how to unload php7_module and load only the 72 module.
I post when I solve it.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios unable to get version after Apache and PHP Upgrad
you should be able to find the config for the old version here
might be
This is the file to edit
and find the name of the new one here
Code: Select all
grep php /etc/httpd/conf.modules.d/*
Code: Select all
/etc/httpd/conf.modules.d/10-php.conf
and find the name of the new one here
Code: Select all
ls -al /etc/httpd/modules/|grep php
Re: Nagios unable to get version after Apache and PHP Upgrad
Thanks for that info. I was able to determine what modules were loaded, and it looks tike the PHP72 module for apache is in fact loading. I've verified other php functionality on apache to be sure.
Could it possibly be something else?
Could it possibly be something else?
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios unable to get version after Apache and PHP Upgrad
Maybe but not sure what it is, Maybe check the httpd error_log
This
This
is what lead me to believe that php was not being processed, because you should never haveThe Check for upgrade page shows: Your installation of Nagios Core <?php echo $this_version; ?> is outdated and should be upgraded.
in a page<?php echo $this_version; ?>
Re: Nagios unable to get version after Apache and PHP Upgrad
I agree with you and was headed in the same direction. httpd/error_log as well as messages is clean.
Quite puzzling.
Is there a command line I can run that is similar to what the http code is attempting to do to see if I can get some more verbose information about the error?
Thanks!
Quite puzzling.
Is there a command line I can run that is similar to what the http code is attempting to do to see if I can get some more verbose information about the error?
Thanks!