Page 4 of 4
Re: Nagios interface won't display, php file downloaded inst
Posted: Wed Jan 08, 2014 2:22 pm
by abrist
No problem. My suggestion is to start with a fresh install of centos 6.x and install the required dependencies for core, and then core from source. Only once everything is tested as working should you proceed to installing other services.
Re: Nagios interface won't display, php file downloaded inst
Posted: Mon Jan 13, 2014 11:42 am
by agenerette
One more thing on this one...
The programmer that I've been working with makes it sound like there's a quick, simple fix, but I'm not entirely sure what he means:
The problem is probably Apache's config files -- the PHP engine must be turned on in any directory that is supposed to recognize a .php file. All you need to enable PHP in a directory is this in the appropriate apache configuration file in /etc/apache2/sites-enabled:
<Directory /home/www/some/directory>
php_flag engine on
</Directory>
That's it. Once done, PHP will work in /home/www/some/directory and all directories under it.
Re: Nagios interface won't display, php file downloaded inst
Posted: Mon Jan 13, 2014 12:02 pm
by abrist
agenerette wrote:<Directory /home/www/some/directory>
php_flag engine on
</Directory>
Interesting. Has php disabled systemwide? This directive (php_flag engine on) does not exist on any of my test systems.
Re: Nagios interface won't display, php file downloaded inst
Posted: Mon Jan 13, 2014 12:16 pm
by agenerette
I'm looking around for places where that flag might be getting set, one way or another, on the host. 'Haven't found anything just yet.
It's true for me, also, that I've never had to do anything with php_flag. None of the notes that I've found on installing Nagios mention setting it, either. This is part of the reason that I was confused by what my peer had mentioned. I'm not really facile, at all, with php.
Re: Nagios interface won't display, php file downloaded inst
Posted: Mon Jan 13, 2014 12:20 pm
by abrist
Unless you have implemented specific security restrictions, enabling php in apache (which you have done) is all that is required. This sounds like an environment specific issue.
Re: Nagios interface won't display, php file downloaded inst
Posted: Wed Jan 15, 2014 12:28 am
by agenerette
This is insane, but I wanted to share it with the Community, just to try and save someone the headache that I dealt with...
For the problem with getting the Nagios console up-and-running, that programmer peer of mine recommended adding "php_flag engine on" to the appropriate configuration file. I've not had to do this in the past, after installing Nagios. On the host in question, though, I found:
root@ccb1:/etc/apache2# grep -R php_flag *
sites-available/default: php_flag engine off
sites-enabled/000-default: php_flag engine off
Which I hadn't put in place. I modified the files such that the php_flag was set to "on", restarted the apache2 service, and the console came up.
Re: Nagios interface won't display, php file downloaded inst
Posted: Wed Jan 15, 2014 10:54 am
by abrist
Brilliant. Glad it is fixed. Very strange though, as I have yet to see a distribution which turns this off in the default apache configs. What distro was this exactly?
Re: Nagios interface won't display, php file downloaded inst
Posted: Fri Jan 17, 2014 1:21 pm
by agenerette
'Sorry for the delayed response, but I've been away for a bit.
root@ccb1:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.3 LTS
Release: 12.04
Codename: precise
Re: Nagios interface won't display, php file downloaded inst
Posted: Fri Jan 17, 2014 3:05 pm
by slansing
Interesting, I'm trying to hunt this down, no luck yet.