Subject: Re: I have an error message from some scripts...
To: Andrew Brown <atatat@atatdot.net>
From: Kevin P. Neal <kpneal@pobox.com>
List: netbsd-help
Date: 05/01/2000 17:05:29
On Mon, May 01, 2000 at 03:34:32PM -0400, Andrew Brown wrote:
> >> [Sun Apr 30 13:50:06 2000] [error] [client 209.5.112.133] Premature end of
> >> script headers: /local/etc/httpd/htdocs/shopzone/jmw/cgi-bin/wwwinstall.cgi
> >
> >That a near-useless error. I hate it when I get that error in my logs.
> 
> well...it indicates that the script is borked.

Not quite. It is possible for the script to be fine and something else
along the way got smashed. For example, if suexec is used and suexec
bails then the script might be fine but if you try to access it on the
web you get the above "near-useless" error. (I had just that happen
about a week or two ago.)
 
> >What happens if you run the CGI on the command line?
> > 
> >> and this is the error when i run ldd on a file:
> >> 
> >> canal.iaw.on.ca:/webpage/shopzone/jmw/cgi-bin# ldd wwwinstall.cgi
> >> ldd: wwwinstall.cgi: not a dynamic executable
> >> canal.iaw.on.ca:/webpage/shopzone/jmw/cgi-bin#
> >
> >Well, that tells you something.
> 
> it suggests to me that wwwinstall.cgi is a perl program, but then
> again, i'm being very solicitous in my guessing.  did perl not get
> re-installed?  or lost in the install?

Wait, hold on a second.

That error message is only found in /usr/src/usr.bin/ldd/ldd_aout/ldd.c,
and my 1.4.1 install of i386 is ELF. 

Is it possible the executable got trashed in the process of doing the
install?
-- 
Kevin P. Neal                                http://www.pobox.com/~kpn/
"How can a child 'just say no' when even the adults cannot because our
corporate-owned culture buys and sells the public as easily as it does 
the Congress?" - from a letter to US News + World Reports, Dec 13 1999