[plug] Perl error message

R.Barnes wpickett at iprimus.com.au
Sat Oct 13 15:40:30 WST 2001


I'm trying to debug a Perl script I'm working on and when running from
the command line I'm getting the error message "Subroutine header
redefined at search.cgi line 134". I'm new to Perl and I can't figure
this one out for the life of me. I have gone over the script again and
again to no avail. Also when I access the script through http the
correct html file is displayed but with this message appended...

	HTTP/1.1 200 OK Date: Sat, 13 Oct 2001 07:22:00 GMT Server:
Apache/1.3.12 (Unix) (Red Hat/Linux) mod_ssl/2.6.6 OpenSSL/0.9.5a
mod_perl/1.24 Connection: close Transfer-Encoding: chunked Content-
Type: text/html; charset=iso-8859-1

The header section of the html is printed by the subroutine... (line
134)

sub header {

print <<END_PRINT ;

	<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

	<html>
	<head>
	<title>$pageTitle</title>
	
	<link rel="stylesheet" href="../mainStyle.css" type="text/css"
media="screen">

	<meta http-equiv="Content-Type" content="text/html;
charset=utf-8">	
	<meta name="description" content="$pageDescription">

END_PRINT

} #end sub header


Also I tried to check the error_log file in /var/log/httpd on the server
and there did not seem to be any mention of the above problem. Is this
usual?

I apologize in advance if I am missing the bleeding obvious here, but
I'm starting to loose a little hair over this one so any comment would
be gratefully appreciated.





More information about the plug mailing list