[smokeping-users] Re: malformed header error

Marc Williams mw at uk.yahoo-inc.com
Sun Oct 13 10:39:04 MEST 2002


Tobias Oetiker wrote:
> Today Marc Williams wrote:
> 
> 
>>using smokeping 1.15
>>
>>from apache error log:
>>[Sat Oct 12 22:37:34 2002] [error] [client 217.12.5.66] malformed header
>>from script. Bad header=Daemonizing /home/y/share/htdo:
>>/home/y/share/htdocs/cgi-bin/smokeping.cgi
>>
>>any ideas?
> 
> 
> this means you are trying the run the smokeping daemon as a cgi
> 
> there are two scripts ... the daemon and the cgi

i had been to liberal in my cut n paste and had:

Smokeping::main("/home/mw/smokeping-1.15/etc/config"");
instead of Smokeping::cgi.

Changed this and now i get:

[Sun Oct 13 08:36:49 2002] [error] [client 217.12.5.69] Premature end of
script headers: /home/y/share/htdocs/cgi-bin/smokeping.cgi

bash-2.05a$ cat /home/y/share/htdocs/cgi-bin/smokeping.cgi
#!/usr/sepp/bin/speedy -w
# -*-perl-*-

use lib qw(/usr/local/rrdtool-1.0.39/lib/perl);
use lib qw(/home/mw/smokeping-1.15/lib);

use Smokeping 1.15;

Smokeping::cgi("/home/mw/smokeping-1.15/etc/config"");


BEGIN {
    if ($ENV{SERVER_SOFTWARE}) {
        $SIG{__WARN__} = sub { print "Content-Type:
text/plain\n\n".(shift)."\n"; };
        $SIG{__DIE__} = sub { print "Content-Type:
text/plain\n\n".(shift)."\n"; exit 1 }
    };
}

--
marc





--
Unsubscribe mailto:smokeping-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:smokeping-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/smokeping-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the smokeping-users mailing list