I'm new to this forum so I hope someone here can help. I am using NMS FormMail.pl to read a form on my wife's website. The script generates the following error:
Global symbol "$url" requires explicit package name at (eval 5) line 68.
Global symbol "$url" requires explicit package name at (eval 5) line 68.
syntax error at (eval 5) line 86, near "validate_abs_url"
Global symbol "$url" requires explicit package name at (eval 5) line 86.
syntax error at (eval 5) line 88, near "}
else"
BEGIN failed--compilation aborted at FormMail.pl line 3268.
I'm using the .pl file directly from the NMS website. Here is the beginning of the file:
#!/usr/bin/perl -wT
#
# NMS FormMail Version 3.14c1
#
use strict;
use vars qw(
$DEBUGGING $emulate_matts_code $secure %more_config
$allow_empty_ref $max_recipients $mailprog @referers
@allow_mail_to @recipients %recipient_alias
@valid_ENV $date_fmt $style $send_confirmation_mail
$confirmation_text $locale $charset $no_content
$double_spacing $wrap_text $wrap_style $postmaster
$address_style
);
# PROGRAM INFORMATION
# -------------------
# FormMail.pl Version 3.14c1
#
# This program is licensed in the same way as Perl
# itself. You are free to choose between the GNU Public
# License
or
# the Artistic License
#
#
# For help on configuration or installation see the
# README file or the POD documentation at the end of
# this file.
# USER CONFIGURATION SECTION
# --------------------------
# Modify these to your own settings. You might have to
# contact your system administrator if you do not run
# your own web server. If the purpose of these
# parameters seems unclear, please see the README file.
#
BEGIN
{
$DEBUGGING = 0;
$emulate_matts_code= 0;
$secure = 1;
$allow_empty_ref = 1;
$max_recipients = 5;
$mailprog = '/usr/sbin/sendmail -oi -t';
$postmaster = '';
@referers = qw(www.example.com localhost);
@allow_mail_to = qw(example@example.net localhost);
@recipients = ();
%recipient_alias = ();
@valid_ENV = qw(REMOTE_HOST REMOTE_ADDR REMOTE_USER HTTP_USER_AGENT);
$locale = '';
$charset = 'iso-8859-1';
$date_fmt = '%A, %B %d, %Y at %H:%M:%S';
$style = '/css/nms.css';
$no_content = 0;
$double_spacing = 1;
$wrap_text = 0;
$wrap_style = 1;
$address_style = 0;
$send_confirmation_mail = 0;
$confirmation_text = <<'END_OF_CONFIRMATION';
From: you@your.com
Subject: form submission
Thank you for your form submission.
END_OF_CONFIRMATION
# You may need to uncomment the line below and adjust the path.
# use lib './lib';
# USER CUSTOMISATION SECTION
# --------------------------
# Place any custom code here# USER CUSTOMISATION << END >>
# ----------------------------
# (no user serviceable parts beyond here)
}
I've checked the permissions on the .pl file and it is set to 755. The file was downloaded using Fetch, in ASCII. I'm not a Perl programmer and have no idea what's wrong with the script. My service provider stated that the file paths for Perl and Sendmail were correct. Can someone please help me out here?
[edited by: tedster at 2:23 am (utc) on Apr 24, 2010]