Page 1 of 1

pnp4nagios install problems

Posted: Mon Jul 11, 2011 8:07 am
by mitchsmith
Hi,

I am trying to install pnp4nagios, I am having some issues at the initial install test screen displayed when i navigate to the url myurl.com/pnp4nagios.

I see the install test screen with multpile errors. The Errors I see are:
1. PHP GD extension PHP GD extension not available
2. PHP zlib extension PHP zlib extension not available
3. PHP magic_quotes_gpc PHP magic_quotes_gpc is deprecated
4. PHP socket extension PHP socket extension not available

All of these are errors relating to my PHP installation.
I have installed php-5.2.17, compiled from source.

Issue 1: I have tried installing the gd package (gd-2.0.33.tar.gz) from source separately, and recompiling php with the --with-gd option set
Issue 2: I have tried installing the zli package (zlib-1.2.5.tar.gz) from source separately, and recompiling php the --with-zlib-dir option set pointing to my zlib installation
Issue 3: The documentation states that this error can be resolved by setting:

Code: Select all

magic_quotes_gpc = Off
in php.ini.... this is the default setting in my PHP.ini so I am confused as to why I get this error.
Issue 4: I have no idea of how to address this issue.

Someone please help me,

Mitchell

Re: pnp4nagios install problems

Posted: Mon Jul 11, 2011 8:01 pm
by mguthrie
What distribution are you installing on?

Re: pnp4nagios install problems

Posted: Tue Jul 12, 2011 5:51 am
by mitchsmith
hi,

I am on:
NagiosĀ® Core Version 3.2.3

Apache2 - Version httpd-2.2.17 Compiled from Source
PHP - Version php-5.2.17 Compiled from Source.
Linux Centos 5.5

I have resolve issues 1, 2, and 3 - By Installing the php libraries libgd and zlib from source, then recompiling php with the command:

Code: Select all

./configure --prefix=/usr/local/php --with-zlib-dir=/usr/local/php/zlib --with-gd=/usr/local/php/libgd --with-apxs2=/usr/local/apache2/bin/apxs
The only issue I am still to resolve is the PHP socket extension PHP socket extension not available issue. Unfortunately the link provided to documentation for this error forward to a 'This topic does not exist yet' faq page (http://docs.pnp4nagios.org/faq/i11)

Mitchell

Re: pnp4nagios install problems

Posted: Tue Jul 12, 2011 6:49 am
by mitchsmith
Ahh

OK Issue 4 resolved

I needed to compile PHP with sockets enabled.

Code: Select all

./configure --prefix=/usr/local/php --with-zlib-dir=/usr/local/php/zlib --with-gd=/usr/local/php/libgd --with-apxs2=/usr/local/apache2/bin/apxs --enable-sockets
Now all Install Tests Pass :D

Re: pnp4nagios install problems

Posted: Wed Jul 13, 2011 9:42 am
by mguthrie
Good deal!