469,904 Members | 1,956 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,904 developers. It's quick & easy.

Malformed Header from script. Bad header.

I check my error log and see these entries:

[Wed Jul 18 13:00:44 2007] [error] [client 10.50.1.200] malformed header from script. Bad header= Missing gauge reports are ind: padata.pl
[Wed Jul 18 13:00:44 2007] [warn] /perl/pema/padata.pl did not send an HTTP header
[Wed Jul 18 13:00:44 2007] [error] [client 10.50.1.200] malformed header from script. Bad header= : padata.pl
[Wed Jul 18 13:00:44 2007] [warn] /perl/pema/padata.pl did not send an HTTP header
[Wed Jul 18 13:00:44 2007] [error] [client 10.50.1.200] malformed header from script. Bad header= Missing gauge reports are ind: padata.pl
[Wed Jul 18 13:00:44 2007] [warn] /perl/pema/padata.pl did not send an HTTP header
[Wed Jul 18 13:00:44 2007] [error] [client 10.50.1.200] malformed header from script. Bad header= Missing gauge reports are ind: padata.pl
[Wed Jul 18 13:00:44 2007] [warn] /perl/pema/padata.pl did not send an HTTP header
[Wed Jul 18 13:00:44 2007] [error] [client 10.50.1.200] malformed header from script. Bad header= Missing gauge reports are ind: padata.pl
[Wed Jul 18 13:00:44 2007] [warn] /perl/pema/padata.pl did not send an HTTP header

Here is the code from my file padata.pl:

use strict;
use CGI ":standard";
use integer;

my $tome = time ;

print "Content-Type: text/html\n\n";

print "<BODY BGCOLOR=#CFEEFF TEXT=#1346AD BACKGROUND=/DWGraphics/DWBG.jpg>\n" ;

################################################## ################################################## ###

# Stores Tabular Data File Path into a Var.
my $TabularData1 = "/Apache2/htdocs/DWTemp/TabularData$tome.txt" ;


# Creates the tabular text file to be displayed later in the page.
my $StationCommand25 = sprintf("/DW/Utils/reportgen.exe g=1 f=$TabularData1") ;
my $systemCommand25 = $StationCommand25 ;
system $systemCommand25 ;



# Opens the tabular text file and stores it's content in an array.
open (GReader, "<$TabularData1") || die "couldn't open the file!" ;
my @raw_data1 = <GReader> ;
close (GReader) ;

################################################## ################################################## ###

# Stores Tabular Data File Path into a Var.
my $TabularData2 = "/Apache2/htdocs/DWTemp/TabularData$tome.txt" ;


# Creates the tabular text file to be displayed later in the page.
my $StationCommand25 = sprintf("/DW/Utils/reportgen.exe g=2 f=$TabularData2") ;
my $systemCommand25 = $StationCommand25 ;
system $systemCommand25 ;



# Opens the tabular text file and stores it's content in an array.
open (GReader, "<$TabularData2") || die "couldn't open the file!" ;
my @raw_data2 = <GReader> ;
close (GReader) ;

################################################## ######################################
# The HTML FILE IS CREATED HERE #
################################################## ######################################


print "<html>" ;

print "<head>" ;
print qq{<META HTTP-EQUIV="Refresh" CONTENT="300">} ;
print "<title>Pennsylvania, Automated Flood Warning System</title>" ;
print "</head>" ;

print "<body alink='#ee0000' bgcolor='#ffffff' link='#0000fd' text='#000000' vlink='#551a8b'>" ;

#Menu Links.
print "<center>" ;
print "<a href='/iflows/index.htm'>HOME</a>" ;
print "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ;
print "<a href='pa.pl'>IFLOWS MENU</a>" ;
print "</center>" ;

print "<p><center><b>This page will automatically refresh every five minutes.</b></center></p>" ;

print "<center>" ;
print "<pre>" ;
print "<b>" ;
print "Data for <a href='Allegheny.pl'>Allegheny</a> County, Pennsylvania" ;
print "<BR>" ;
# Prints the tabular text data that is stored in the array to the screen.
print "@raw_data1" ;

print "</b>" ;
print "</pre>" ;
print "</center>" ;

print "<BR>" ;
print "<BR>" ;

print "<center>" ;
print "<pre>" ;
print "<b>" ;
print "Data for <a href='Armstrong.pl'>Armstrong</a> County, Pennsylvania" ;
print "<BR>" ;
# Prints the tabular text data that is stored in the array to the screen.
print "@raw_data2" ;

print "</b>" ;
print "</pre>" ;
print "</center>" ;

print "<BR>" ;
print "<BR>" ;

print "</center>" ;
print "</body>" ;
print "</html>" ;

################################################## ######################################

Everything seems to operate normally, but I am wondering what to do about these errors. Any help would be greatly appreciated.
Jul 18 '07 #1
1 23284
Motoma
3,237 Expert 2GB
My only suggestion would be to fire up ethereal and make sure the headers are being sent appropriately.
Aug 1 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by arenaTR | last post: by
4 posts views Thread by Phillip T. Murphy | last post: by
6 posts views Thread by John | last post: by
1 post views Thread by Sam | last post: by
17 posts views Thread by so many sites so little time | last post: by
reply views Thread by matej | last post: by
12 posts views Thread by William Gill | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.