CGI problems

Hi,
I am new and just installed Nagios on my machine. It is redhat 8, installed via RPM.

I have everything up and running (configured) but I get the following errors on CGI’s.

Error message:
Premature end of script headers: status.cgi
This is also the only message trhat appears in the apache logs.

I have run several of the cgi’s from commandf line and get the following output:

[root@firewall cgi]# ./status.cgi
Cache-Control: no-store
Pragma: no-cache
Refresh: 90
Last-Modified: Sat, 26 Mar 2005 19:34:19 GMT
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-type: text/html

Current Network Status

Segmentation fault
[root@firewall cgi]#

I have checked my GD installation, and it appear to be ok (it is also used by Webalyser and mrtg and it is working fine)

Thoughts?
:?:

There are a few things that could be wrong. Check out these threads and see if any help you.

meulie.net/forum_viewtopic.php?21.366.10
meulie.net/forum_viewtopic.php?21.366

Plua, this from the GD website is what fixed my problem with “premature header” errors. So I’d start with this one.
boutell.com/gd/manual2.0.33.html

UPGRADING UNIX USERS: READ THIS FIRST! Modern versions of gd install by default to /usr/local/lib and /usr/local/include. If you already have an older version of gd in /usr/lib and /usr/include, you may wish to use:

./configure --prefix=/usr

To ensure that your new installation overwrites the old.

This worked for me, by installing GD again. But this time, by using
./configure --prefix=/usr

I didn’t even have to recompile nagios or anything, but you might have to.