PDA

View Full Version : Need a little form handling help


-=DoW=- SmokieRat
August 1st, 2005, 22:39
Got a form handling .cgi but I can't seem to sonfi it right.
Need a little help on where I've got configured wrong.

cgi proggie server side

#!/var/www/cgi-bin

use Socket;
################################################## ################
# (C)1998-2000 Bignosebird.com bnbform v4.0
# Use of this script means that you accept the disclaimer and
# agree to the terms of use located at the bottom of the
# script.
#
# Updated January 31, 2000
#
# This script is provided without support. Please read the
# README.TXT file, as well as following the troubleshooting
# links and information at http://bignosebird.com/cgi.shtml
# Our BBS is located at http://bignosebird.com/bbs.shtml
#
# Socket based e-mail for cross platform capability!
#
# Attention users of earlier versions of BNBFORM-
# You MUST read the README.TXT file to know how to configure
# your forms for use with this new version. Otherwise your
# logfile, countfile, autorespond, etc... will stop working.
# It was necessary to make these changes for security reasons.
#
#
############## SPECIAL FORM VARIABLES ############################
#required: comma delimited list of required entry fields
#data_order: comma delimited list indicating what fields to actually
# print and in what order.
#outputfile: the name of the file to save the data in if using a file.
# the file will automatically be named ending with .bout
#emailfile: the name of the file to hold only the sender e-mail address
# the file will automatically be named ending with .bemf
#ok_url: URL to go to if successful
#not_ok_url URL to go to if unsuccessful
#submit_to: email address of person to input receive data by mail
# this can be a comma seperated list of e-mail addresses
#cc_to: email address of Cc Recipient
# this can be a comma seperated list of e-mail addresses
#submit_by: email address of person completing form
#autorespond: NO LONGER USED AS OF JAN 31, 2000
#automessage: text to print for autoconfirmation e-mail
# the file will automatically be named ending with .baut
#form_id: name of form for e-mail subject
#countfile: name of file for serial number counter
# the file will automatically be named ending with .bcnt
#okaydomains: prevents calling the script from other sites,
# without restricting e-mail addresses.
# replaces $SECURE_NAME from earlier versions.
# use only lower case letters.
#SMTP_SERVER: the full host name of the server providing e-mail
# gateway service
################################################## ################


## MAIN ################################################## ########

# uncomment the line below, and change bignosebird to your domain
# name if you wish to make is so the script can only be called
# from your site.

#@okaydomains=("ustournamentpoker.com", "www.ustournamentpoker.com", "mail.ustournamentpoker.com");

#SMTP_SERVER: indicates the name of the host acting as the e-mail
# gateway. "localhost" should work on most systems.

$SMTP_SERVER="mail.ustournamentpoker.com";

#OR IF SMTP IS UNAVAILABLE TO YOU, USE SEND_MAIL-
# BUT NOT BOTH!

#$SEND_MAIL="/usr/lib/sendmail -t";

$lockfile="/tmp/bnbform.lck";

$SD=&sys_date;
$ST=&sys_time;

&decode_vars;

&valid_page;

if ($fields{'countfile'} ne "") { &get_number; }

&valid_data;

&write_data;

if ($fields{'automessage'} ne "") { &answer_back; }

if ($fields{'ok_url'} ne ""){
print "Location: $fields{'ok_url'}\n\n"; exit;
}
else { &thank_you; }

################################################## ################
sub write_data
{

if ($fields{'submit_by'} ne "") {
if (&valid_address == 0) {
&bad_email;
exit;
}
}

if ($fields{'submit_by'} ne "" && $fields{'emailfile'} ne "") {
open (EMF,">>$fields{'emailfile'}");
print EMF "$fields{'submit_by'}\n";
close (EMF);
}

if ($fields{'submit_to'} ne "") {
$msgtext="";
$msgtext .= "On $SD at $ST,\n";
$msgtext .= "The following information was submitted:\n";
$msgtext .= "From Host: $ENV{'REMOTE_ADDR'}\n";
}

if ($fields{'outputfile'} ne "") {
&get_the_lock;
open(OUT_FILE,">>$fields{'outputfile'}");
}

foreach $to_print (@sortlist) {
if ($fields{'outputfile'} ne "")
{ print OUT_FILE "$fields{$to_print}\|"; }
if ($fields{'submit_to'} ne "")
{ $msgtext .= "$to_print = $fields{$to_print}\n"; }
}
if ($fields{'outputfile'} ne "") {
print OUT_FILE "$SD\|$ST\|\n";
close(OUT_FILE);
&drop_the_lock;
}

foreach $to_get (@recipients) {
$mailresult=&sendmail($fields{submit_by}, $fields{submit_by}, $to_get, $SMTP_SERVER, $fields{form_id}, $msgtext);
if ($mailresult ne "1") {
print "Content-type: text/html\n\n";
print "MAIL NOT SENT. SMTP ERROR: $mailcodes{'$mailresult'}\n";
exit
}
}
foreach $to_cc (@cc_tos) {
$mailresult=&sendmail($fields{submit_by}, $fields{submit_by}, $to_cc, $SMTP_SERVER, $fields{form_id}, $msgtext);
if ($mailresult ne "1") {
print "Content-type: text/html\n\n";
print "MAIL NOT SENT. SMTP ERROR: $mailcodes{'$mailresult'}\n";
exit
}
}

}

################################################## ################
sub decode_vars
{
$i=0;
read(STDIN,$temp,$ENV{'CONTENT_LENGTH'});
@pairs=split(/&/,$temp);
foreach $item(@pairs) {
($key,$content)=split(/=/,$item,2);
$content=~tr/+/ /;
$content=~s/%(..)/pack("c",hex($1))/ge;
$content=~s/\t/ /g;
$content=~s/\0//g; #strip nulls
$fields{$key}=$content;
if ($key eq "data_order") {
$content=~s/\012//g;
$content=~s/\015//g;
$content=~s/ //g;
$content=~s/ //g;
@sortlist=split(/,/,$content);
}
if ($key eq "required") {
$content=~s/\012//g;
$content=~s/\015//g;
$content=~s/ //g;
@mandatory=split(/,/,$content);
}
if ($key eq "submit_to") {
$content=~s/\012//g;
$content=~s/\015//g;
$content=~s/ //g;
@recipients=split(/,/,$content);
}
if ($key eq "cc_to") {
$content=~s/\012//g;
$content=~s/\015//g;
$content=~s/ //g;
@cc_tos=split(/,/,$content);
}

}
if (
( ($fields{automessage}=~ /^([-\/\w.]+)$/ || $fields{automessage} eq "") &&
($fields{countfile}=~ /^([-\/\w.]+)$/ || $fields{countfile} eq "") &&
($fields{emailfile}=~ /^([-\/\w.]+)$/ || $fields{emailfile} eq "") &&
($fields{outputfile}=~ /^([-\/\w.]+)$/ || $fields{outputfile} eq "") )
) {$donothing=0;}
else {
print "Content-type: text/html\n\n sorry, invalid characters...\n";
exit;
}
if ($fields{automessage} ne "") {$fields{automessage} .= ".baut";}
if ($fields{countfile} ne "") {$fields{countfile} .= ".bcnt";}
if ($fields{emailfile} ne "") {$fields{emailfile} .= ".bemf";}
if ($fields{outputfile} ne "") {$fields{outputfile} .= ".bout";}
}

################################################## ################
sub valid_data
{
if ($fields{'data_order'} eq "") #make sure we have work to do!
{
print "Content-type: text/html\n\n";
print <<__W1__;

<H1>NO data_order list SPECIFIED!</H1>

__W1__
exit;
}

foreach $to_check (@mandatory) #test all required fields, bail on 1st bad
{
if ($fields{$to_check} eq "") {
if ($fields{'not_ok_url'} ne "") {
print "Location: $fields{'not_ok_url'}\n\n";
exit;
}
else { &try_again; }
}
}

}

################################################## ################
sub thank_you
{
print "Content-type: text/html\n\n";
print <<__W2__;
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<TABLE WIDTH=550 BORDER=1>
<TR>
<TD>
<H1>Thank you!</H1>
Your information has been sent and I will be in touch
with you as soon as I can
<P>
Here is the information you provided:
<P>
__W2__

foreach $itm (@sortlist) {
print <<__W2A__;
$itm: $fields{$itm}
<BR>
__W2A__
}

print <<__W2B__;
</TD>
</TR>
</TABLE>

__W2B__

exit;
}

################################################## ################
sub try_again
{
print "Content-type: text/html\n\n";
print <<__W3__;

<H1>Missing Data!</H1>
<B>Please press the back button and fill in
all required fields!<P></B>

__W3__
exit;
}

################################################## ################
sub answer_back
{

$subject = "Thank you";
$msgtext="";
if ($fields{'automessage'} ne "") {
open (AM,"< $fields{'automessage'}");
while (<AM>) {
chop $_;
$msgtext .= "$_\n";
}
close(AM);
}
else {
$msgtext =<<__W4__;

Thank you for your submission. I will be
getting in touch with you soon.

__W4__
}
$replyaddr=$recipients[0];
$mailresult=&sendmail($replyaddr, $replyaddr, $fields{submit_by}, $SMTP_SERVER, $subject, $msgtext);
}

################################################## ################

sub get_number
{
$newnum=0;
open(COUNTER,"<$fields{'countfile'}");
while($thisnum=<COUNTER>) {
if ($thisnum eq "") { $thisnum = 0;}
$newnum = $thisnum + 1;
}
close(COUNTER);
open(COUNTER,">$fields{'countfile'}");
print COUNTER "$newnum";
close (COUNTER);
$fields{'counter'}=$newnum
}

################################################## ################
sub valid_address
{
$testmail = $fields{'submit_by'};
if ($testmail =~/ /)
{ return 0; }
if ($testmail =~ /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/ ||
$testmail !~ /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/)
{ return 0; }
else { return 1; }
}

################################################## ################
sub bad_email
{
print <<__STOP_OF_BADMAIL__;
Content-type: text/html

<FONT SIZE="+1">
<B>
SORRY! Your request could not be processed because of an
improperly formatted e-mail address. Please use your browser's
back button to return to the form entry page.
</B>
</FONT>
__STOP_OF_BADMAIL__
}

sub get_the_lock
{
local ($endtime);
$endtime = 60;
$endtime = time + $endtime;
while (-e $lockfile && time < $endtime)
{
# Do Nothing
}
open(LOCK_FILE, ">$lockfile");
}

sub drop_the_lock
{
close($lockfile);
unlink($lockfile);
}


################################################## ################
sub valid_page
{
if (@okaydomains == 0)
{return;}
$DOMAIN_OK=0;
$RF=$ENV{'HTTP_REFERER'};
$RF=~tr/A-Z/a-z/;
foreach $ts (@okaydomains) {
if ($RF =~ /$ts/)
{ $DOMAIN_OK=1; }
}
if ( $DOMAIN_OK == 0) {
print "Content-type: text/html\n\n Sorry....Cant run from here!";
exit;
}
}


################################################## #################
################################################## #################
sub sendmail {

# error codes below for those who bother to check result codes <gr>

# 1 success
# -1 $smtphost unknown
# -2 socket() failed
# -3 connect() failed
# -4 service not available
# -5 unspecified communication error
# -6 local user $to unknown on host $smtp
# -7 transmission of message failed
# -8 argument $to empty
#
# Sample call:
#
# &sendmail($from, $reply, $to, $smtp, $subject, $message );
#
# Note that there are several commands for cleaning up possible bad inputs - if you
# are hard coding things from a library file, so of those are unnecesssary
#

my ($fromaddr, $replyaddr, $to, $smtp, $subject, $message) = @_;

$to =~ s/[ \t]+/, /g; # pack spaces and add comma
$fromaddr =~ s/.*<([^\s]*?)>/$1/; # get from email address
$replyaddr =~ s/.*<([^\s]*?)>/$1/; # get reply email address
$replyaddr =~ s/^([^\s]+).*/$1/; # use first address
$message =~ s/^\./\.\./gm; # handle . as first character
$message =~ s/\r\n/\n/g; # handle line ending
$message =~ s/\n/\r\n/g;
$smtp =~ s/^\s+//g; # remove spaces around $smtp
$smtp =~ s/\s+$//g;

if (!$to)
{
return(-8);
}

if ($SMTP_SERVER ne "")
{
my($proto) = (getprotobyname('tcp'))[2];
my($port) = (getservbyname('smtp', 'tcp'))[2];

my($smtpaddr) = ($smtp =~
/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/)
? pack('C4',$1,$2,$3,$4)
: (gethostbyname($smtp))[4];

if (!defined($smtpaddr))
{
return(-1);
}

if (!socket(MAIL, AF_INET, SOCK_STREAM, $proto))
{
return(-2);
}

if (!connect(MAIL, pack('Sna4x8', AF_INET, $port, $smtpaddr)))
{
return(-3);
}

my($oldfh) = select(MAIL);
$| = 1;
select($oldfh);

$_ = <MAIL>;
if (/^[45]/)
{
close(MAIL);
return(-4);
}

print MAIL "helo $SMTP_SERVER\r\n";
$_ = <MAIL>;
if (/^[45]/)
{
close(MAIL);
return(-5);
}

print MAIL "mail from: <$fromaddr>\r\n";
$_ = <MAIL>;
if (/^[45]/)
{
close(MAIL);
return(-5);
}

foreach (split(/, /, $to))
{
print MAIL "rcpt to: <$_>\r\n";
$_ = <MAIL>;
if (/^[45]/)
{
close(MAIL);
return(-6);
}
}

print MAIL "data\r\n";
$_ = <MAIL>;
if (/^[45]/)
{
close MAIL;
return(-5);
}

}

if ($SEND_MAIL ne "")
{
open (MAIL,"| $SEND_MAIL");
}

print MAIL "To: $to\n";
print MAIL "From: $fromaddr\n";
print MAIL "Reply-to: $replyaddr\n" if $replyaddr;
print MAIL "X-Mailer: Perl Powered Socket Mailer\n";
print MAIL "Subject: $subject\n\n";
print MAIL "$message";
print MAIL "\n.\n";

if ($SMTP_SERVER ne "")
{
$_ = <MAIL>;
if (/^[45]/)
{
close(MAIL);
return(-7);
}

print MAIL "quit\r\n";
$_ = <MAIL>;
}

close(MAIL);
return(1);
}

sub sys_date
{
%mn = ('Jan','01', 'Feb','02', 'Mar','03', 'Apr','04',
'May','05', 'Jun','06', 'Jul','07', 'Aug','08',
'Sep','09', 'Oct','10', 'Nov','11', 'Dec','12' );
$sydate=localtime(time);
($day, $month, $num, $time, $year) = split(/\s+/,$sydate);
$zl=length($num);
if ($zl == 1)
{ $num = "0$num";}
$yyyymmdd="$year\-$mn{$month}\-$num";
return $yyyymmdd;
}


sub sys_time
{
$sydate=localtime(time);
($day, $month, $num, $time, $year) = split(/\s+/,$sydate);
return $time;
}
#--------DISCLAIMER-AND-COPYRIGHT-INFORMATION---------------------------#
# ANY SOFTWARE PROVIDED BY BIGNOSEBIRD.COM, INC. IS ``AS IS'' AND ANY
# EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BIGNOSEBIRD.COM, INC. OR
# ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# THIS SCRIPT IS PROVIDED WITHOUT SUPPORT
#
# THIS SCRIPT IS FREEWARE AND CAN BE USED FOR BOTH COMMERCIAL AND
# NON-COMMERCIAL USE. REPUBLICATION OF THE SCRIPT REQUIRES OUR PERMISSION.
# webmaster\@bignosebird.com
#-----------------------------------------------------------------------#



PHP embedded inside page

<FORM METHOD="POST" ACTION="/cgi-bin/bnbform.cgi">
<table width="500px">
<tr>
<td>Your Name:*</td>
<td><INPUT TYPE="TEXT" NAME="name" SIZE=35 MAXLENGTH=50></td>
</tr>
<tr>
<td>E-Mail Address:*</td>
<td><INPUT TYPE="TEXT" NAME="submit_by" SIZE=35 MAXLENGTH=50></td>
</tr>
<tr>
<td>Phone Number:*</td>
<td><INPUT TYPE="TEXT" NAME="phone" size=35 maxlength=20></td>
</tr>
<tr>
<td>Venue:</td>
<td><INPUT TYPE="TEXT" NAME="venue" SIZE=35 MAXLENGTH=50></td>
</tr>
<tr>
<td>Venue Address:</td>
<td><INPUT TYPE="TEXT" NAME="venue_address" size=35 maxlength=50></td>
</tr>
<tr>
<td>FIELDS MARKED WITH * ARE REQUIRED!</td>
<td><center><INPUT TYPE="submit" VALUE="Submit"><input type="reset" value="Reset"></center></td>
</tr>
</table>
<!-- SCRIPT CONFIGURATION SECTION -->
<INPUT TYPE="HIDDEN" NAME="required"
VALUE="name,country,submit_by">
<INPUT TYPE="HIDDEN" NAME="data_order"
VALUE="name,phone,submit_by,venue,venue_address">
<INPUT TYPE="HIDDEN" NAME="submit_to" VALUE="scott@ustournamentpoker.com">
<INPUT TYPE="HIDDEN" NAME="automessage" VALUE="mymessage">
<INPUT TYPE="HIDDEN" NAME="outputfile" VALUE="formlog">
<INPUT TYPE="HIDDEN" NAME="countfile" VALUE="formlog">
<INPUT TYPE="HIDDEN" NAME="emailfile" VALUE="formlog">
<INPUT TYPE="HIDDEN" NAME="form_id" VALUE="Website Referrals">
<INPUT TYPE="HIDDEN" NAME="ok_url"
VALUE="thanks.html">
<INPUT TYPE="HIDDEN" NAME="not_ok_url"
VALUE="oops.html">
<!-- END OF SCRIPT CONFIGURATION SECTION -->
</FORM>

-=DoW=- SledgeHammer
August 1st, 2005, 22:51
Geez Smokie, it's obvious that you've got the " where the ' is supposed to be...

Sheesh....amateurs

-=DoW=- SmokieRat
August 1st, 2005, 23:03
Well I'm just testing it right now. The "Make sure it works before it goes live" thing. If ya wanna take a look at what the error is when you hit submit try
http://www.ustournamentpoker.com/test.htm
Also checked the logs and it says

http://www.ustournamentpoker.com/test.htm
[Mon Aug 01 19:37:43 2005] [error] [client 66.93.39.131] Premature end of script headers: bnbform.cgi, referer:

-=DoW=- SledgeHammer
August 1st, 2005, 23:24
Put a big 'ole PURPLE in there and you should be fine.

Acedeal
August 2nd, 2005, 00:22
checking into it now--
did you upload it like the dir's say to do ie ascii or bin mode-
what did you edit it with I HOPE NOT WORDPAD--
only use notepad or some other proggie that does not insert hidden MS codes into it--
is it flagged like it's supposed to be ie 755 / 775 etc etc..

where did you get this so I can RTFM :)

http://www.codingforums.com/showthread.php?t=63901


FishMonger (http://www.codingforums.com/member.php?u=22990) vbmenu_register("postmenu_334698", true);
CF Regular

Join Date: May 2005
Posts: 123


IMO, that script is not written very well and they don't appear the be maintaining it, also, you are the 2nd person in 3 days that has the exact same problem with the email portion of the scripts from that source. This thread may be of interest.

http://codingforums.com/showthread.php?t=63652


http://bignosebird.com/trouble.shtml
guy that made it

Acedeal
August 2nd, 2005, 00:37
jeeze this script was written in
# Updated January 31, 2000

:)
You need to get rid of this security nightmare--
If all you need is a form processor, then use the one I use, and or the one I setup for AASA

I'll put the forms in your cgi-bin dir
you'll need to edit the html file and move it to some other dir besides cgi-bin.
or you can use the html file as an example on how to make the forms processor work..

Acedeal
August 2nd, 2005, 00:41
your top line should prolly be

#!/usr/bin/perl

and not :)

#!/var/www/cgi-bin
but i need to read up on it anyway--
but use my forms processor it's more up-to-date and secure.

-=DoW=- SmokieRat
August 2nd, 2005, 09:41
Ok, ditchin the old and tryin yours.

-=DoW=- SmokieRat
August 2nd, 2005, 10:20
Configured it best I could. Pretty much mimicked what you had but it gave me this.


[Tue Aug 02 09:12:14 2005] [error] [client 66.93.39.131] sh: line 1: /usr/lib/sendmail: No such file or directory, referer: http://www.ustournamentpoker.com/test.htm
[Tue Aug 02 09:12:14 2005] [error] [client 66.93.39.131] [66.93.39.131] /cgi-bin/mailer_1.pl: close sendmail pipe failed, mailprog=[/usr/lib/sendmail -oi -t] at (eval 8) line 108., referer: http://www.ustournamentpoker.com/test.htm
[Tue Aug 02 09:12:14 2005] [error] [client 66.93.39.131] , referer: http://www.ustournamentpoker.com/test.htm



Application Error

An error has occurred in the program

See the web server's error log for details

-=DoW=- SmokieRat
August 2nd, 2005, 10:22
Hrm, seems I missin a piece maybe? What's sendmail?

Warcuddle
August 2nd, 2005, 10:47
it means that the client send an e-mail to the server :-) (i think its for the info they fil in)

Acedeal
August 2nd, 2005, 13:26
Hrm, seems I missin a piece maybe? What's sendmail?
this is sendmail
http://www.sendmail.org/

it's what does all the mail handleing--

I'll look at the script and see what's going on

Sendmail is installed Server-Wide.

EDIT--
Script now working, I just need to tune whatever it is you changed because it's not sending email :icon_smi:


ug 2 14:01:57 server ipop3d[14652]: Logout user=rogue@aaserveradmins.com host=[216.40.228.52] nmsgs=0 ndele=0
Aug 2 14:02:03 server sendmail[14654]: j72J23Rh014654: Authentication-Warning: server.proplans-hosting.com: airtelnw1 set sender to scott@ustournamentpoker.com using -f
Aug 2 14:02:03 server sendmail[14654]: j72J23Rh014654: from=scott@ustournamentpoker.com, size=881, class=0, nrcpts=2, msgid=<200508021902.j72J23Rh014654@ustournamentpoker.com>, relay=airtelnw1@localhost
Aug 2 14:02:03 server sendmail[14656]: j72J23U9014656: from=<scott@ustournamentpoker.com>, size=1238, class=0, nrcpts=2, msgid=<200508021902.j72J23Rh014654@ustournamentpoker.com>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Aug 2 14:02:03 server sendmail[14656]: j72J23U9014656: to=<acedeal@dow-sniper.net>, delay=00:00:00, mailer=virthostmail, pri=61238, stat=queued
Aug 2 14:02:03 server sendmail[14656]: j72J23U9014656: to=<scott@ustournamenpoker.com>, delay=00:00:00, mailer=esmtp, pri=61238, stat=queued
Aug 2 14:02:03 server sendmail[14654]: j72J23Rh014654: to=scott@ustournamenpoker.com,acedeal@dow-sniper.net, ctladdr=scott@ustournamentpoker.com (22433/542), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=60881, relay=localhost.localdomain. [127.0.0.1], dsn=2.0.0, stat=Sent (j72J23U9014656 Message accepted for delivery)
Aug 2 14:02:05 server MailScanner[32398]: New Batch: Scanning 1 messages, 1803 bytes
Aug 2 14:02:05 server MailScanner[32398]: Virus and Content Scanning: Starting
Aug 2 14:02:06 server MailScanner[32398]: Uninfected: Delivered 1 messages
Aug 2 14:02:06 server virthostmail[14665]: Chrooting to /home/virtual/site3/fst
Aug 2 14:02:06 server sendmail[14665]: j72J26rR014665: from=<scott@ustournamentpoker.com>, size=1637, class=0, nrcpts=1, msgid=<200508021902.j72J23Rh014654@ustournamentpoker.com>, proto=ESMTP, relay=root@localhost
Aug 2 14:02:06 server sendmail[14664]: j72J23U9014656: to=<acedeal@dow-sniper.net>, delay=00:00:03, xdelay=00:00:00, mailer=virthostmail, pri=151238, relay=dow-sniper.net, dsn=2.0.0, stat=Sent (j72J26rR014665 Message accepted for delivery)
Aug 2 14:02:06 server sendmail[14664]: j72J23U9014656: to=<scott@ustournamenpoker.com>, delay=00:00:03, xdelay=00:00:00, mailer=esmtp, pri=151238, relay=ustournamenpoker.com, dsn=5.1.2, stat=Host unknown (Name server: ustournamenpoker.com: host not found)
Aug 2 14:02:06 server sendmail[14664]: j72J23U9014656: j72J26xE014664: DSN: Host unknown (Name server: ustournamenpoker.com: host not found)
Aug 2 14:02:06 server virthostmail[14672]: Chrooting to /home/virtual/site11/fst
Aug 2 14:02:06 server spamd[4527]: connection from localhost.localdomain [127.0.0.1] at port 50208
Aug 2 14:02:06 server spamd[14676]: info: setuid to acedeal@dow-sniper.net succeeded
Aug 2 14:02:06 server spamd[14676]: processing message <200508021902.j72J23Rh014654@ustournamentpoker.com> for acedeal@dow-sniper.net:521.
Aug 2 14:02:07 server sendmail[14672]: j72J26Qw014672: from=<>, size=3270, class=0, nrcpts=1, msgid=<200508021902.j72J26xE014664@server.proplans-hosting.com>, proto=ESMTP, relay=root@localhost
Aug 2 14:02:07 server sendmail[14664]: j72J26xE014664: to=<scott@ustournamentpoker.com>, delay=00:00:01, xdelay=00:00:01, mailer=virthostmail, pri=32636, relay=ustournamentpoker.com, dsn=2.0.0, stat=Sent (j72J26Qw014672 Message accepted for delivery)
Aug 2 14:02:07 server spamd[4527]: connection from localhost.localdomain [127.0.0.1] at port 50209
Aug 2 14:02:07 server spamd[14684]: info: setuid to scott@ustournamentpoker.com succeeded
Aug 2 14:02:07 server spamd[14684]: processing message <200508021902.j72J26xE014664@server.proplans-hosting.com> for scott@ustournamentpoker.com:22433.
Aug 2 14:02:07 server spamd[14684]: clean message (2.7/10.3) for scott@ustournamentpoker.com:22433 in 0.5 seconds, 3610 bytes.
Aug 2 14:02:07 server sendmail[14677]: j72J26Qw014672: to=<scott@ustournamentpoker.com>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=33477, dsn=2.0.0, stat=Sent
Aug 2 14:02:37 server spamd[14676]: clean message (-97.3/10.3) for acedeal@dow-sniper.net:521 in 30.9 seconds, 1928 bytes.
Aug 2 14:02:37 server sendmail[14667]: j72J26rR014665: to=<acedeal@dow-sniper.net>, delay=00:00:31, xdelay=00:00:31, mailer=local, pri=31827, dsn=2.0.0, stat=Sent

almost got it--
error somewhere

found one of your errors--see if you can spot your typo

@referers = qw(www.ustournamentpoker.com www.clan-solutions.com ustournamentpoker.com.com 207.218.250.99 localhost);
@allow_mail_to = qw(207.218.250.99 ustournamentpoker.com www.ustournamentpoker.com clan-solutions.com localhost);

-=DoW=- SmokieRat
August 2nd, 2005, 15:30
I didn't really change much except changing the domain names and e-mail addresses

lol got a little .com happy :)

Acedeal
August 2nd, 2005, 15:30
OK,
it's fixed--

if you want to change the success page-
edit the form handler and look for this

Outputs the footer of the success page, including the return link if
configured.

=cut

sub success_page_footer {
my ($self) = @_;

print qq{<p><hr size="1" width="75%" /></p>\n};
$self->success_page_return_link;
print <<END;
<div align="center">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="30%" id="AutoNumber1">
<tr>
<td width="50%" align="center">
<hr size="1" width="75%" />
<p align="center">
<font size="-1">
<a href="http://www.ustournamentpoker.com/">Return to Main Page</a><br>
&copy; 2005 ustournamentpoker.com
</font>
</p>
</td>
</tr>
</table>
</div>
</body>
</html>
END
}

I just stuck some code in there, edit it to suit your needs. Just be carefull what ya add, and how you edit the thing..

and if you don't want to "what you submitted page edit your html file and remove this line-


<!-- Took this out for Testing Purposes

<input type="hidden" name="redirect" value="http://www.ustournamentpoker.com/index.htm" />
-->

-=DoW=- SmokieRat
August 2nd, 2005, 15:32
Righto! Thanks alot! :) Ace is King!

-=DoW=- SmokieRat
August 2nd, 2005, 15:41
Gah! Ok, this little proggies dun like me. I pulled the file from the dir to change the e-mail address it sends the form to, I forgot a T. And now it gives me an internal server error!? Ok, what'd I do now? I only added 1 t in notepad then reuploaded it.

Acedeal
August 2nd, 2005, 15:50
you need to make sure that it's flagged as 0755, cgi and perl needs to have the excute bit flagged to run :)
somehow you changed the bits to 0644

You might want to use your admin control panel's file manager to edit any of those cgi / perl scripts. that way they don't screw'd up on uploads

-=DoW=- SmokieRat
August 2nd, 2005, 19:41
Roger that. Forgot about the 0755 flagging.

Acedeal
August 2nd, 2005, 22:22
Thank You,
And have a great Day!!

From;
Your wonderfull God (Guru-on-Duty) like being
Tommy B :)

-=DoW=- SmokieRat
August 3rd, 2005, 00:45
Ok, now that that is done. You must make me a php program that will create World peas and happiness. :mrgreen: