tags:

views:

90

answers:

2

When I try to run my Perl CGI program, the returned web page tells me:

Software error: For help, please send mail to the webmaster (root@localhost), giving this error message and the time and date of the error.

Here is my code in one of the file:


#!/usr/bin/perl

use lib "/home/ecoopr/ecoopr.com/CPAN";
use CGI;
use CGI::FormBuilder;
use CGI::Session;
use CGI::Carp (fatalsToBrowser);
use CGI::Session;
use HTML::Template;
use MIME::Base64 ();
use strict;

require "./db_lib.pl";
require "./config.pl";

my $query = CGI->new; 
my $url = $query->url();
my $hostname = $query->url(-base => 1);
my $login_url = $hostname . '/login.pl';
my $redir_url = $login_url . '?d=' . $url;
my $domain_name = get_domain_name();

my $helpful_msg = $query->param('m');
my $new_trusted_user_fname = $query->param('u');
my $action = $query->param('a');
$new_trusted_user_fname = MIME::Base64::decode($new_trusted_user_fname);

####### Colin: Added July 12, 2009 #######
my $view = $query->param('view');
my $offset = $query->param('offset');
####### Colin: Added July , 2009 #######

#print $session->header;
#print $new_trusted_user;

my $helpful_msg_txt = qq[];
my $helpful_msg_div = qq[];
if ($helpful_msg)
A: 

no this is my whole script..i can see the page loading correctly but i get this error message on top of the header

kiran
This section is for answers to your question. If you have a comment or are responding to someone else's comment, please use the comments section just below your question. There is a link there entitled "add comment".
dreamlax
+6  A: 

The "please send mail to the webmaster" message you see is a generic message that the web server gives you when anything goes wrong and nothing handles it. It's not at all interesting in terms of solving the actual problem. Check the error log to find possible relevant error output from your program.

And, go through my How do I troubleshoot my Perl CGI script? advice on finding the problem.

My guess is that you have a syntax error with that dangling if(). What you have posted isn't a valid Perl program.

Good luck,

brian d foy