I have several web pages that are perl files with .pl extensions. Inside these I have HTML code for the web page display. I am trying to have a certain page refresh every five minutes.
I was told to use <META HTTP-EQUIV="Refresh" CONTENT="300"> and place it inside the HEAD tags. Well this doesn't work because when I click on the link to go to the page, I get and error.
Does anyone have any ideas please?
9 4429 miller 1,089
Recognized Expert Top Contributor
and the error that you receive is?
- Miller
Oops sorry. Here it is:
"Internal Server Error
The server encountered an internal error or misconfiguratio n and was unable to complete your request.
Please contact the server administrator, @@ServerAdmin@@ and inform them of the time the error occurred, and anything you may have done to cause the error.
More information may be available in the server error log.
Apache/2.0.40 Server at 192.168.107.20 Port 80"
I checked the error log and it said:
[Wed Jul 11 12:44:37 2007] [error] [client 192.168.107.20] malformed header from script. Bad header= Missing gauge reports are ind: padata.pl
[Wed Jul 11 12:44:37 2007] [warn] /perl/PEMA/padata.pl did not send an HTTP header
[Wed Jul 11 12:44:37 2007] [error] [client 192.168.107.20] malformed header from script. Bad header= : padata.pl
[Wed Jul 11 12:44:37 2007] [warn] /perl/PEMA/padata.pl did not send an HTTP header
[Wed Jul 11 12:44:37 2007] [error] [client 192.168.107.20] malformed header from script. Bad header= Missing gauge reports are ind: padata.pl
[Wed Jul 11 12:44:37 2007] [warn] /perl/PEMA/padata.pl did not send an HTTP header
[Wed Jul 11 12:44:37 2007] [error] [client 192.168.107.20] malformed header from script. Bad header= Missing gauge reports are ind: padata.pl
[Wed Jul 11 12:44:37 2007] [warn] /perl/PEMA/padata.pl did not send an HTTP header
[Wed Jul 11 12:44:37 2007] [error] [client 192.168.107.20] malformed header from script. Bad header= Missing gauge reports are ind: padata.pl
[Wed Jul 11 12:44:37 2007] [warn] /perl/PEMA/padata.pl did not send an HTTP header
Any ideas? Thanks for the help.
Sorry to include so much in the above post. I just want to make sure all the info is available.
Let me know what you experts think. Thanks for the help. :)
KevinADC 4,059
Recognized Expert Specialist
Looks like your perl file is missing an http header. Can we see one of the perl files that generates these errors?
Here it is. I bolded the line where I have the refresh code. I have a comment mark in front of it right now but when I take it out, it gives me the error. Thanks.
# padata.pl
# ------------
# Displays All PA Tabular Data
#
# Author:
#
# Revisions: (none)
# ------------------------------------------------------------------------------
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$tom e.txt" ;
# Creates the tabular text file to be displayed later in the page.
my $StationCommand 25 = sprintf("/DW/Utils/reportgen.exe g=1 f=$TabularData1 ") ;
my $systemCommand2 5 = $StationCommand 25 ;
system $systemCommand2 5 ;
# 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$tom e.txt" ;
# Creates the tabular text file to be displayed later in the page.
my $StationCommand 25 = sprintf("/DW/Utils/reportgen.exe g=2 f=$TabularData2 ") ;
my $systemCommand2 5 = $StationCommand 25 ;
system $systemCommand2 5 ;
# 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) ;
############### ############### ############### ############### ######
# Stores Tabular Data File Path into a Var.
my $TabularData3 = "/Apache2/htdocs/DWTemp/TabularData$tom e.txt" ;
# Creates the tabular text file to be displayed later in the page.
my $StationCommand 25 = sprintf("/DW/Utils/reportgen.exe g=3 f=$TabularData3 ") ;
my $systemCommand2 5 = $StationCommand 25 ;
system $systemCommand2 5 ;
# Opens the tabular text file and stores it's content in an array.
open (GReader, "<$TabularData3 ") || die "couldn't open the file!" ;
my @raw_data3 = <GReader> ;
close (GReader) ;
############### ############### ############### ############### ######
# Stores Tabular Data File Path into a Var.
my $TabularData4 = "/Apache2/htdocs/DWTemp/TabularData$tom e.txt" ;
# Creates the tabular text file to be displayed later in the page.
my $StationCommand 25 = sprintf("/DW/Utils/reportgen.exe g=4 f=$TabularData4 ") ;
my $systemCommand2 5 = $StationCommand 25 ;
system $systemCommand2 5 ;
# Opens the tabular text file and stores it's content in an array.
open (GReader, "<$TabularData4 ") || die "couldn't open the file!" ;
my @raw_data4 = <GReader> ;
close (GReader) ;
############### ############### ############### ############### ######
# Stores Tabular Data File Path into a Var.
my $TabularData5 = "/Apache2/htdocs/DWTemp/TabularData$tom e.txt" ;
# Creates the tabular text file to be displayed later in the page.
my $StationCommand 25 = sprintf("/DW/Utils/reportgen.exe g=5 f=$TabularData5 ") ;
my $systemCommand2 5 = $StationCommand 25 ;
system $systemCommand2 5 ;
# Opens the tabular text file and stores it's content in an array.
open (GReader, "<$TabularData5 ") || die "couldn't open the file!" ;
my @raw_data5 = <GReader> ;
close (GReader) ;
############### ############### ############### ############### ######
# The HTML FILE IS CREATED HERE #
############### ############### ############### ############### ######
print "<html>" ;
print "<head>" ; #print "<META HTTP-EQUIV="Refresh" CONTENT="60">" ;
print "<title>Pennsyl vania, Automated Flood Warning System</title>" ;
print "</head>" ;
print "<body alink='#ee0000' bgcolor='#fffff f' link='#0000fd' text='#000000' vlink='#551a8b' >" ;
#Menu Links.
print "<center>" ;
print "<a href='/iflows/index.htm'>HOME </a>" ;
print " &n bsp;   ;" ;
print "<a href='pa.pl'>IF LOWS MENU</a>" ;
print "</center><br>" ;
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 "<pre>" ;
print "<b>" ;
print "Data for <a href='Bedford.p l'>Bedford</a> County, Pennsylvania" ;
print "<BR>" ;
# Prints the tabular text data that is stored in the array to the screen.
print "@raw_data3 " ;
print "</b>" ;
print "</pre>" ;
print "</center>" ;
print "<BR>" ;
print "<BR>" ;
print "<center>" ;
print "<pre>" ;
print "<b>" ;
print "Data for <a href='Bradford. pl'>Bradford</a> County, Pennsylvania" ;
print "<BR>" ;
# Prints the tabular text data that is stored in the array to the screen.
print "@raw_data4 " ;
print "</b>" ;
print "</pre>" ;
print "</center>" ;
print "<BR>" ;
print "<BR>" ;
print "<center>" ;
print "<pre>" ;
print "<b>" ;
print "Data for <a href='Butler.pl '>Butler</a> County, Pennsylvania" ;
print "<BR>" ;
# Prints the tabular text data that is stored in the array to the screen.
print "@raw_data5 " ;
print "</b>" ;
print "</pre>" ;
print "</center>" ;
print "<BR>" ;
print "<BR>" ;
print "</center>" ;
print "</body>" ;
print "</html>" ;
############### ############### ############### ############### ######
KevinADC 4,059
Recognized Expert Specialist
You have double-quotes inside a double-quoted string, which will cause an error: print "<META HTTP-EQUIV="Refresh" CONTENT="60">" ;
escape the double-quotes:
print "<META HTTP-EQUIV=\"Refresh \" CONTENT=\"60\"> " ;
or more properly use a single-quoted string since there is no variable or meta character interpolation needed: print '<META HTTP-EQUIV="Refresh" CONTENT="60">' ;
also, check the meta tag syntax to make sure it is correct for your application. I am not sure that CONTENT="60" is going to do anything.
Kevin:
That worked. Thank you so much. I had to escape the quotes because the single quotes were acting funky.
I now get my html refresh inside my PERL code. Thanks so much.
Matthew K.
miller 1,089
Recognized Expert Top Contributor
I had to escape the quotes because the single quotes were acting funky.
You should avoid having to explicitly escape quoting characters in a string. Instead just use a different quoting character. If you still want interpolation, then the following is what I choose: print qq{<META HTTP-EQUIV="Refresh" CONTENT="60">}; perldoc perlop Quote and Quote-like Operators
- Miller
Thank you miller. That worked brilliantly. I am still very new to PERL and even HTML for that matter. Thank you both for your help.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Rick |
last post by:
Hi folks,
I have a web page I wrote for a class assignment (which I embellished a little) that doesn't seem to
work on all browsers, platforms, etc. The problem appears to be that the page doesn't refresh
completely when the page calls it self. The refresh (which should happen when the form action
fires) should reload a file into an iFrame, but it doesn't. I do have 3 submit buttons on one form,
but it works well for me. On the...
|
by: Manu |
last post by:
Hi there,
I am using a perl script to generate this html page which just
redirects users to my ftp server. The problem is I get a "page cannot
be displayed" in IE 6.0 (haven't tried other browsers) when the
redirection happens. But the redirection happens to the correct ftp
location and on pressing "Refresh" the FTP login dialog bar appears
and everything is fine.
Here is the HTML in question.
|
by: TS |
last post by:
Im in a web page and call an asynchronous method in business class. the call
back method is in the web page.
When page processes, it runs thru code begins invoking the method then the
page unloads. When the callback method is raised, only the method in the web
page is run and the page never refreshes, it seems it all happens on the
server side.
I am trying to refresh the constrols on the page inside the callback method,
but when id...
|
by: no one |
last post by:
Hi,
I want to write a pearl script that will go out to a web
site and download the page. Then pull certain value pairs
out of it. Basically I want to see graphs of snr etc.
Is grabbing the html possible in perl? I know the parsing
is. Basically I want to see if any of the values change and
it corresponds to cable outages.
|
by: owlice |
last post by:
Greetings!
I thought I'd add a little something to a web site, a "tip of the week," and wanted it automated so that if I get hit by a truck (or, more likely, am forgetful), the tip is updated automatically.
I learned enough Perl (read: just enough) to code a script that does what I want it to do. Now the question is: how to get it to run automatically.
I would like the program to be invoked when someone, anyone, hits my homepage. I...
| |
by: paulie |
last post by:
Hi,
I have been experiencing an issue when trying to use AJAX to reload a DIV area
using a timer of 2000ms, which contains a html page with another DIV and javascript.
Scenario
-------------
I have perl script which simply runs a ps on a Solaris server and generates
a static html page with all of the code perfectly and this html page works fine
when viewing it statically or with a META REFRESH header tag. The idea is to give the user...
|
by: worlman385 |
last post by:
I need to parse the following HTML page and extract TV listing data
using VC++
http://tvlistings.zap2it.com/tvlistings/ZCGrid.do
any good way to extract the data?
is easy for VC++ to call PERL script and do some regular expression?
since the HTML page is not XML well formed, I cannot use a XML parser
|
by: Jeff |
last post by:
I've been working on porting some perl CMS code to PHP.
What I would do in perl is search through a template for instruction
and replace those instructions with specific bits for that particular
page and page path.
With PHP it's easy to embed instruction in the html and output thhat
as a .php page. How do I write a .html as a file?
I can think of some awkward ways to do this.
|
by: sukatoa |
last post by:
I don't know where to put this thread exactly, but i just want some recommendations about my problem....
I wonder why some of my GIF images doesn't show on my page.....
May i know what should be an image format to be used in HTML?
Here is the situation,
Im currently developing a form in JSP, every visit/refresh on that page will change the filename that will be used for confirmation.....
( common on sign-up forms )....
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |