Last month I upgraded from Nagios core 3 To Core 4.2 and from php5.6 to 7.2 running on FreeBSD 11.2. After commenting a few deprecated lines from nagios.cfg all seemed well. Last night I rebooted the server and Nagios started running but the web interface was not available. Apache 2.4 failed to start due to a couple of PHP related lines in httpd.conf that it didn't understand. I commented those out and httpd started but no joy on PHP pages.
It seems php5.6 continued to run in memory after the upgrade and apache/nagios happily used it until the reboot. Can anyone direct me to docs on what I need to reconfigure to get a config created for php5 ready for php7? Nagios is the only thing using apache and PHP on the server.
Nagios is monitoring and emailing alerts just fine. I just can't get to the web interface.
Thanks in advance!
PHP broke after Core3 to Core4 and php5 to php7 upgrade
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: PHP broke after Core3 to Core4 and php5 to php7 upgrade
Can you share any errors you are experiencing in your apache error_log when trying to access the page along with the current nagios.conf apache config file.
My guess would be that this had little to do with the nagios upgrade and most likely something wrong with the php upgrade.
My guess would be that this had little to do with the nagios upgrade and most likely something wrong with the php upgrade.
Re: PHP broke after Core3 to Core4 and php5 to php7 upgrade
Thanks for the reply!
I'm pretty sure it's an apache/php7 issue but I've not had much luck finding what needs to change with all the apps to get it working again.
Apache won't start until I comment out these lines from the nagios directory config bits of httpd.conf:
php_flag engine on
php_admin_value open_basedir /usr/local/www/nagios/:/var/spool/nagios/
If I comment that out I can point my browser to http://ns2/nagios/index.php (or main.php) but the browser just asks me which application I want to use to open the file and no error is reported in /var/log/httpd-error.log.
I've found docs for optimizing PHP configs for high performance implementations but not so much for basic PHP7/Apache configs to get Nagios to work.
I'm pretty sure it's an apache/php7 issue but I've not had much luck finding what needs to change with all the apps to get it working again.
Apache won't start until I comment out these lines from the nagios directory config bits of httpd.conf:
php_flag engine on
php_admin_value open_basedir /usr/local/www/nagios/:/var/spool/nagios/
If I comment that out I can point my browser to http://ns2/nagios/index.php (or main.php) but the browser just asks me which application I want to use to open the file and no error is reported in /var/log/httpd-error.log.
I've found docs for optimizing PHP configs for high performance implementations but not so much for basic PHP7/Apache configs to get Nagios to work.
Re: PHP broke after Core3 to Core4 and php5 to php7 upgrade
It's working now:
Looks like mod_php72 didn't get installed even though it was a known dependency. Once that was installed apache started without commenting the two php lines in httpd.conf.
Thanks again for responding anyway!
Looks like mod_php72 didn't get installed even though it was a known dependency. Once that was installed apache started without commenting the two php lines in httpd.conf.
Thanks again for responding anyway!
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: PHP broke after Core3 to Core4 and php5 to php7 upgrade
Great! Glad you got it working!darthnul wrote:It's working now:
Looks like mod_php72 didn't get installed even though it was a known dependency. Once that was installed apache started without commenting the two php lines in httpd.conf.
Thanks again for responding anyway!
Locking thread