What am I doing wrong ????

adalt's picture

They have: 72 posts

Joined: Dec 2000

Hi,

None of my scripts seem to work so I guess that I am doing something really stupid.
I am ftp'ing in ascii mode and chmod'ing as per the instructions
One of them is a form http://www.4legs.fi/4legs/ppc.htm
the form script is Matt Wrights FormMail version 1.6
and the configurable section is as follows

#!/opt/perl/bin/perl
##############################################################################
# FormMail Version 1.6 #
# Copyright 1995-1997 Matt Wright [email protected] #
# Created 06/09/95 Last Modified 05/02/97 #
# Matt's Script Archive, Inc.: http://www.worldwidemart.com/scripts/ #
##############################################################################
# COPYRIGHT NOTICE #
# Copyright 1995-1997 Matthew M. Wright All Rights Reserved. #
# #
# FormMail may be used and modified free of charge by anyone so long as this #
# copyright notice and the comments above remain intact. By using this #
# code you agree to indemnify Matthew M. Wright from any liability that #
# might arise from its use. #
# #
# Selling the code for this program without prior written consent is #
# expressly forbidden. In other words, please ask first before you try and #
# make money off of my program. #
# #
# Obtain permission before redistributing this software over the Internet or #
# in any other medium. In all cases copyright and header must remain intact #
##############################################################################
# Define Variables #
# Detailed Information Found In README File. #

# $mailprog defines the location of your sendmail program on your unix #
# system. #

$mailprog = '/usr/lib/sendmail';

# @referers allows forms to be located only on servers which are defined #
# in this field. This security fix from the last version which allowed #
# anyone on any server to use your FormMail script on their web site. #

@referers = ('worldwidemart.com','206.31.72.203');

# Done #
##############################################################################

The Information from my server is

Perl /opt/perl/bin/perl
Sendmail /usr/lib/sendmail
sh /bin/sh
date /bin/date

The server is using perl 5.004

So WHAT am I doing wrong ???
Thanks again

Tony

[Edited by adalt on Feb. 04, 2001 at 06:09 AM]

Before you criticise someone walk a mile in their shoes......
Then, if they don't like what you say they are 1 mile away and barefoot.

They have: 334 posts

Joined: Dec 1999

From what you gave, the only thing that looks wrong is the line:

@referers = ('worldwidemart.com','206.31.72.203');

Make sure your domain is listed there, not worldwidemart.com

adalt's picture

They have: 72 posts

Joined: Dec 2000

Hi,
I changed the line that you suggested, but still not working,
Could there be something wrong with my html at http://www.4legs.fi/4legs/ppc.htm that is making an internal server error ??
Is anyone willing to ftp to my server to see what I am doing wrong as this is SOOOooooo frustrating !!!
If anyone wants to help i will mail you password & user name

Thanks again

Tony

Before you criticise someone walk a mile in their shoes......
Then, if they don't like what you say they are 1 mile away and barefoot.

They have: 850 posts

Joined: Jul 1999

Try looking through your error log files (usually in /var/log).
Also try telneting into your host, change the directory to where the script can be found and type
perl scriptname.cgi -w
which will output any warnings it find in your code.

adalt's picture

They have: 72 posts

Joined: Dec 2000

I have tried to access the error logs, but I cannot for some reason
When I write perl -w FormMail.cgi it comes back with this ;
__________________________________________________________
Use of uninitialized value at FormMail.cgi line 118.
Use of uninitialized value at FormMail.cgi line 122.
Content-type: text/html

Error: Request Method

Error: Request Method

The Request Method of the Form you submitted did not match
either GET or POST. Please check the form and make sure
the
method= statement is in upper case and matches GET or POST.

FormMail
V1.6 © 1995 - 1997 Matt Wright
A Free Product of Matt's S
cript Archive, Inc.

_________________________________________________________

As far as I can tell the Form method is correct, (but I could be wrong !!!

Tony

Before you criticise someone walk a mile in their shoes......
Then, if they don't like what you say they are 1 mile away and barefoot.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.