Subject: Re: I have an error message from some scripts...
To: Frank DeChellis <frankd@iaw.on.ca>
From: Kevin P. Neal <kpneal@pobox.com>
List: netbsd-help
Date: 05/01/2000 08:51:52
On Sun, Apr 30, 2000 at 02:00:14PM -0400, Frank DeChellis wrote:
> Hi!

Hi.
 
> I wrote a message a few days ago about the possibility of our OS upgrade
> from 1.3 to 1.4.1 causing problems in some compiled scripts...we have all of
 
> anyway, this is the error we find in our error_log in apache:
> 
> [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.

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.

What does "file wwwinstall.cgi" tell you?

Can you rename the cgi to something else and install a shell script 
wrapper around the cgi? That way you can do system call tracing on
the cgi to see what files it is looking at, what programs it is trying to
run, etc. See "ktrace" and "kdump" man pages.

Is it possible a NetBSD-stock program was moved from 1.3 to 1.4.1 and your
cgi doesn't know about the move?
-- 
Kevin P. Neal                                http://www.pobox.com/~kpn/

"35. Yekcim Esuom budgeted $100 for renting a truck. How far can he..."
A Survey of Mathematics with Applications, 5th ed, Angel+Porter, p 293