The permission denied could be due to the permissions and/or ownership of
rrd.cgi. Find out what user runs apache (it is in the apache config file),
and what group it runs as. Then make the owner and group of rrd.cgi the same
as the owner and group of apache, and make the permissions on rrd.cgi 540
(chmod 540 rrd.cgi).
The script headers could be due to the fact that you don't have the
following header:
Content-type: test/html
or whatever it will generate. Here is an example of the start on one of my
cgi graphs (Mine is in C, but you should be able to follow it).
printf("Content-Type: text/html\n");
printf("Expires: %s, %02i %s %4i %02i:%02i:%02i
GMT\n",days[now.tm_wday],now.tm_mday,months[now.tm_mon],now.tm_year+1900,now
.tm_hour,now.tm_min,now.tm_sec);
printf("refresh: 305\n\n");
printf("<html><head>");
printf("<title>CRL Network Monitoring - Home Page.</title>");
printf("</head>");
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 23 January 2002 6:48 AM
To: rrd-users ml
Subject: [rrd-users] Newbie: rddcgi graph
<snip>
rrd.cgi:
#!/usr/bin/rrdcgi
<HTML>
<HEAD><TITLE>RRDCGI Demo</TITLE></HEAD>
<BODY>
<H1>RRDCGI Example Page</H1>
<P>
<RRD::GRAPH test.gif --imginfo '<IMG SRC="%s" WIDTH="%lu" HEIGHT="%lu" >'
-t
RWANDAL01_E0 -v bps
DEF:inoctets=rwandal.rrd:input:AVERAGE
DEF:outoctets=rwandal.rrd:output:AVERAGE
CDEF:inbps=inoctets,8,* CDEF:outbps=outoctets,8,* A$
LINE1:outbps#0000FF:"Out traffic">
</P>
</BODY>
</HTML>
apache log:
[error] (13)Permission denied: exec of /home/web/cgis/test.gif failed
[error] [client 170.50.81.149] Premature end of script headers:
/home/web/cgis/test.gif
[error] (8)Exec format error: exec of /home/web/cgis/test.gif failed
[error] [client 170.50.81.149] Premature end of script headers:
/home/web/cgis/test.gif
Any help is appreciated. Thanks in advance.
Johnny H. Leon
**************************************************************************
The information contained herein is confidential and is intended solely
for the addressee(s). It shall not be construed as a recommendation to
buy or sell any security. Any unauthorized access, use, reproduction,
disclosure or dissemination is prohibited.
Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates
shall assume any legal liability or responsibility for any incorrect,
misleading or altered information contained herein.
**************************************************************************
--
Unsubscribe mailto:[EMAIL PROTECTED]
Help mailto:[EMAIL PROTECTED]
Archive http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
**********************************************************************
The information contained in this e-mail is confidential and is
intended only for the use of the addressee(s).
If you receive this e-mail in error, any use, distribution or
copying of this e-mail is not permitted. You are requested to
forward unwanted e-mail and address any problems to the
MIM Holdings Limited Support Centre.
For general enquires: ++61 7 3833 8000
Support Centre e-mail: [EMAIL PROTECTED]
Support Centre phone: Australia 1800500646
International ++61 7 38338042
**********************************************************************
--
Unsubscribe mailto:[EMAIL PROTECTED]
Help mailto:[EMAIL PROTECTED]
Archive http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi