Malformed header from script??

Malformed header from script??

Post by Jim Stephen » Tue, 21 Jul 1998 04:00:00



Hi,

I may not be in the right NG, but if anyone knows the answer to
this, you folks do.

We're running Apache_1.2b4 on Linux (Kernel 2.??) and I've
been intermittently getting nailed with the following
error from some cgi scripts.

** [Mon Jul 20 12:04:46 1998] access to /home/httpd/cgi-bin/brockbuts
failed for 209.41.152.31, reason: malformed header from script **

There about 100 users hitting this cgi script (not simultaneously)
and for approx. 15-20% of them the above error shows
up in /var/log/httpd/error_log.

At first I assumed that it was something along the lines of forgetting
to put
in </html> or </form>.  But everything seems fine in html source.

Any insights, hints, tips or even a good banana cake recipt would
be greatly appreciated.

Thanks in advance....

Jim Stephens

 
 
 

Malformed header from script??

Post by Richard Peipe » Tue, 21 Jul 1998 04:00:00


Since it is only happening PART of the time it is either a script
problem which only affects certain cases (ie only when they click this
button, or only when they use MSIE 2.0). Or, your script is crashing.

        I expect it is the latter, add some debugging to the script so when it
crashes it gives you some debugging to the error log so you can find the
error.

                                Richard
                                Supernews


> Hi,

> I may not be in the right NG, but if anyone knows the answer to
> this, you folks do.

> We're running Apache_1.2b4 on Linux (Kernel 2.??) and I've
> been intermittently getting nailed with the following
> error from some cgi scripts.

> ** [Mon Jul 20 12:04:46 1998] access to /home/httpd/cgi-bin/brockbuts
> failed for 209.41.152.31, reason: malformed header from script **

> There about 100 users hitting this cgi script (not simultaneously)
> and for approx. 15-20% of them the above error shows
> up in /var/log/httpd/error_log.

> At first I assumed that it was something along the lines of forgetting
> to put
> in </html> or </form>.  But everything seems fine in html source.

> Any insights, hints, tips or even a good banana cake recipt would
> be greatly appreciated.

> Thanks in advance....

> Jim Stephens



 
 
 

Malformed header from script??

Post by -bill » Wed, 22 Jul 1998 04:00:00


After getting the same error I bashed my head against the wall for a few
hours before I figured out that my script was putting in a leading " "
and that was a malformed header.  It was hard to debug because the space
didn't show up (or rather, I was blind to it.  It really was in the
error message)
--

-bill-


 
 
 

Malformed header from script??

Post by -bill » Wed, 22 Jul 1998 04:00:00


After getting the same error I bashed my head against the wall for a few
hours before I figured out that my script was putting in a leading " "
and that was a malformed header.  It was hard to debug because the space
didn't show up (or rather, I was blind to it.  It really was in the
error message)
--

-bill-


 
 
 

1. Help: Apache: cgi script - malformed header from script

Trying to get simple cgi to work...

I've written a simple shell script to output some basic html, but when I run
it I get this error message in the error log:

  malformed header from script. Bad header=<HTML>

I've looked in the FAQ and it's helpful in the sense that it states:
"the server was expecting a complete set of HTTP headers (one or more followed
by a blank line), and didn't get them."

Unfortunately, I don't know what an http header is or looks like, and the
Apache documentation isn't helpful in this respect. My shell script simply
wrties to stdout:

<html>
<title> a title </title>
<body>
some text
</body>
</html>

Also...

I've added a "ScriptLog logs/cgi_log" entry to the httpd.conf file, but there's
no output there (yes I've restarted the server). I've even touched the file so
that it exists (with the same permissions as the other log files) but no joy.


crashes when I open this newsgroup.

Alistair.

2. UCI Extension Courses

3. Server Error:malformed header from script..Apache

4. Reaching the end of the pipe :)

5. malformed header from script?

6. PLEASE HELP!!

7. Malformed header in script - HELP

8. NFS-Bootdisk

9. Error: HTTPd: malformed header from script

10. malformed header from script...

11. Malformed header from this script?

12. malformed header from cgi

13. Malformed header