By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,916 Members | 1,317 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,916 IT Pros & Developers. It's quick & easy.

Malformed Header from script. Bad header.

P: 8
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
Share this Question
Share on Google+
1 Reply


Motoma
Expert 2.5K+
P: 3,235
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.