Home

   Home

   Download


Help

   FAQ

   Installation

   Message Board

   Importing Data File
   Into GoldMine
   Into Act


Other

   Testimonies

   Custom Programming

   PHP Version


Other Favorites

   Hire a clean comedian

   Bible Search Engine

   Bible in a Year

   Parallel Bible

   The Richer Life










 





[ Message Board Home ]    [ Post Reply ]    [ Log In ]    [ Sign Up ]



  Subject: bizmail server error
  Posted: 01/11/2004 at 2:22:01 am
  By: haski

Hello,
I installed bizmail on my server(cgi-bin) chmod 755 bizmail.cgi success.cgi sendmail.cgi, configured bizmail.cgi(i used the right info for mailprog & perlpath filled my email usingetween "\@") but i receive "Error 500" i have configured onother formmail script tfmail.pl with the same config info and it works but why this cool script don't?
here is my config info in tfmail.pl:
#!/usr/bin/perl -wT
use strict;
#
# $Id: TFmail.pl,v 1.22 2003/06/14 14:50:23 nickjc Exp $

use constant MAILPROG => '/usr/sbin/sendmail -t -i ';

bizmail.cgi
#!/usr/bin/perl -wT
## make sure the path to pearl is correct above. ##

$mailprog = "/usr/sbin/sendmail -t -i "; ## $mailprog = path to sendmail on your server ##

and here is my host logfile:
[Sat Jan 10 18:00:02 2004] [error] [client myip] script not found or unable to stat: /home/virtual/site102/fst/var/www/cgi-bin/hosted.gif
String found where operator expected at bizmail.cgi line 179, near "$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack(""
(Might be a runaway multi-line "" string starting on line 163)
(Missing semicolon on previous line?)
String found where operator expected at bizmail.cgi line 179, near "C", hex($1))/eg;
"
Out of memory!
[Sat Jan 10 18:00:06 2004] [error] [client myip] Premature end of script headers: /home/virtual/site102/fst/var/www/cgi-bin/bizmail.cgi
[Sat Jan 10 18:00:11 2004] [error] [client myip] script not found or unable to stat: /home/virtual/site102/fst/var/www/cgi-bin/hosted.gif



Please help what the problem is?
best wishes desa80



  Subject: Re: bizmail server error
  Posted: 01/11/2004 at 12:13:37 pm
  By: Seth Knorr

Try this

Path to perl Use:
#!/usr/bin/perl

and for sendmail use:
$mailprog = "/usr/sbin/sendmail";

Third It looks like while editing the script you accidentaly deleted a semicolon.

As the error log says line 179.
So you may want to either

a. re-download the scripts and re configure.

b. Open bizmail.cgi with a text editor and go to line 179 (WORKS BEST WITH NOTEPAD) and make sure there is a ; at the end of the line.

Seth



  Subject: Re: bizmail server error
  Posted: 01/12/2004 at 1:22:09 pm
  By: haski

I tried with
Try this

Path to perl:
#!/usr/bin/perl

and for sendmail:
$mailprog = "/usr/sbin/sendmail";

but still error 500 Server error,
here is my new error log file:
[Tue Jan 13 01:24:50 2004] [error] mod_gzip: TRANSMIT_ERROR:ISMEM:104
String found where operator expected at bizmail.cgi line 179, near "$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack(""
(Might be a runaway multi-line "" string starting on line 163)
(Missing semicolon on previous line?)
String found where operator expected at bizmail.cgi line 179, near "C", hex($1))/eg;
"
Out of memory!
[Tue Jan 13 01:32:33 2004] [error] [client ip] Premature end of script headers: /home/virtual/site102/fst/var/www/cgi-bin/bizmail.cgi
String found where operator expected at bizmail.cgi line 179, near "$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack(""
(Might be a runaway multi-line "" string starting on line 163)
(Missing semicolon on previous line?)
String found where operator expected at bizmail.cgi line 179, near "C", hex($1))/eg;
"
Out of memory!
[Tue Jan 13 01:32:37 2004] [error] [client ip] Premature end of script headers: /home/virtual/site102/fst/var/www/cgi-bin/bizmail.cgi

What to do?

best wishes desa80



  Subject: Re: bizmail server error
  Posted: 01/12/2004 at 2:12:33 pm
  By: Seth Knorr

How about coping and pasting your bizmail.cgi file into the message and I will take a look at it.

Seth



  Subject: Re: bizmail server error
  Posted: 01/13/2004 at 2:31:40 am
  By: haski

#!/usr/bin/perl
## make sure the path to pearl is correct above. ##

##########################################################################################
## FILE: bizmail.cgi ##
## ##
## BizMailForm Version 1.9 ##
## © Copyright 2000-2003 Seth Michael Knorr mail@sethknorr.com ##
## ##
## http://www.bizmailform.com/ ##
## Please contact me with any bugs found, or any bug fixes. ##
## ##
##########################################################################################
## ##
## There is no email support provided for this script, the only support can be ##
## found at our web site: http://www.bizmailform.com/ ##
## ##
## ##
## ANY PERSON(S) MAY USE AND MODIFY THESE SCRIPT(S) FREE OF CHARGE FOR EITHER BUSINESS ##
## OR PERSONAL, HOWEVER AT ALL TIMES HEADERS AND COPYRIGHT MUST ALWAYS REMAIN IN TACT. ##
## ##
## REDISTRIBUTION FOR PROFIT IS PROHIBITED WITH OUT THE CONSENT OF SETH KNORR. ##
## ##
## By using this code you agree to indemnify Seth M. Knorr from any liability that ##
## might arise from its use. ##
## ##
##########################################################################################
## ##
## MIME Lite.pm copyright information below: ##
## ##
## Eryq (F<eryq@zeegee.com>).President, ZeeGee Software Inc. (F<http://www.zeegee.com>).##
## ##
##########################################################################################


$MY_error_page = "error.html"; # HTML error page you configured ##

## set $send_email_results = "2"; to not send form results to your email ##
## (DEFAULT) set $send_email_results to "1" to send form results to your email ##

$send_email_results = "1";


## $delete_dups = "1"; will delete all dups. ##
## To leave duplicate posts set $delete_dups = "2"; (DEFAULT - MOST COMMON CHOICE) ##
## (A duplicate is determined by the email field.) ##

$delete_dups = "2"; # USHUALY, IT IS ONLY SET TO 1 FOR PEOPLE GENERATING LEADS ##


## $useLib defines the method of sending the email auto response and email form info. ##
## Set $useLib = "sendmail"; TO USE THE SENDMAIL METHOD
## Set $useLib = "smtp"; TO USE THE SMTP METHOD

$useLib = "sendmail";

$mailprog = "/usr/sbin/sendmail"; ## $mailprog = path to sendmail on your server ##

$smtp_server = ""; ## Optional $smtp_server is your smtp server address (ONLY WHEN USING SMTP) ##


## $reply_from_name = from name that will apear on the auto response email. ##

$reply_from_name = "BulReg Registraciq";


## $sendto{"1"} is Where form submissions will be sent, ##
## (REMEMBER THE \ BEFORE THE @ SIGN) ##
## This is also the reply address used in the auto response to person filling out the ##
## form. ##


$sendto{"1"} = "haski\@abv.bg"; ## (REMEMBER THE \ BEFORE THE @ SIGN)##

## $cc_to Is an optional field. If you want to carbon copy form information to a ##
## second email address, enter a value above. If you do not want to carbon copy the ##
## form submissions, leave the value blank. ##

$cc_to{"1"} = "";

## $datafile{"1"} & $datafile{"2"} is the file name of the data file that form data will get sent to. ##

$datafile{"1"} = "bizmail.dat";
$datafile{"2"} = "";

## $send_attachement specifys if you want to send an attachment with the auto response. ##
## Set $send_attachement = "1"; to send attachment with autoresponse ##
## Set $send_attachement = "2"; to not send attachment with autoresponse ##

$send_attachement = "2";

## IF USING A FILE ATTACHMENT YOU MUST CONFIGURE THE BELOW THREE VARIABLES ##

$attachment_nm = "file.txt"; ## file name of attachement ##

$att_path = "/path/to/$attachment_nm"; ## Path to file attachement##

$att_format = ".txt"; ## File attachement extension, or file type (basicaly .exstension ) ##


### O P T I O N A L V A R I A B L E S ###

$setokurl = "0";

## to use @okurls to verify the url the form is submited by set $setokurl to 1 and ##
## set $setokurl to 0 if you do not want to use @okurls to verfiy form submission URL ##


@okurls = (""http://yourdomain.com", "34.344.344.344");





#### N O N E E D T O E D I T V A R I A B L E S B E L O W ###

$versionnumber = "Version 1.9";
$footer = "<br><br><br><br><br><center><font face='Arial'><a href='http://www.bizmailform.com/' target='_blank'><font color='#ff0000'>Form processing script provided by Biz Mail Form</font></a> </center></font>";

my($offset) = @_;
$offset = $offset * 86400;

my($sec, $min, $hour, $dayofmonth, $mon, $year, $weekday, $dayofyear, $IsDST) = localtime(time + $offset);
$year = $year + 1900;
my(@months) = ("JA", "FB", "MR", "AP", "MY", "JN", "JL", "AG", "SP", "Oc", "NV", "DE");
my($monthname) = $months[$mon];
my(@monthsnum) = ("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12");
my($monthnamenum) = $monthsnum[$mon];

my(@monthsactual) = ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
my($monthnameactual) = $monthsactual[$mon];


my(@days) = ("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday");
my($dayname) = $days[$weekday-1];

${'monthname'} = "$monthname";
${'monthnamenum'} = "$monthnamenum";
${'dayofmonth'} = "$dayofmonth";

${'hour'} = "$hour";

if ($hour <= 13){
$hour = "$hourplus";
$newhour = ($hourplus-12);

}else{
$newhour = "$hour";
}


if ($min <= 9){
$newmin = "0$min";
}else{
$newmin = "$min";
}


if($ENV{'REQUEST_METHOD'} eq "GET") {
require 'error.cgi';
&nopost;
}else{
e"t_form_data;
&main;
}


sub get_form_data {

read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs=split(/&/,$buffer);
foreach $pair (@pairs)
{
@a = split(/=/,$pair);
$name=$a[0];
$value=$a[1];
$value2=$a[1],;
$name =~ s/\+/ /g;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s/~!/ ~!/g;
$value =~ s/\+/ /g;
$value =~ s/(\r)+/\-\-/g;
$value =~ s/\n+//g;
$value =~ s/(\-\-)+/\n/g;
## $value =~ s|\&|\&\;|g; # convert all '&' to "&" (must be first)
## The above value was removed for means of new success page ##
$value =~ s|<|\<\;|g; # convert all '<' to "<"
$value =~ s|>|\>\;|g; # convert all '>' to ">"
$value =~ s|\n|<br>\n|g; # convert all line feeds to "<br>" and line feed

## $value2 is used in variables of data sent to the data file##
$value2 =~ s/(\")+/"/g; #V1.5 Bug Fix - Converts " to " in data file #
$value2 =~ s/(')+/'/g; #V1.8 Bug Fix - Converts ' to ' in data file #
$value2 =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
#$value2 =~ s/~!/ ~!/g;
#$value2 =~ s/\+/ /g;
#$value2 =~ s/(\r)+/\-\-/g;
#$value2 =~ s/\n+//g;



push (@formdata,$name);
push (@formdata,$value);
push (@formdata2,$name);
push (@formdata2,$value2);
push (@form,$nameform);
push (@form,$valueform);
push (@formname,$name);
push (@formvalue,$value);
push (@formvalue2,$value2);


}
%formname=@formname;
%formname;
%formdvalue2=@formvalue2;
%formvalue2;
%formvalue=@formvalue;
%formvalue;
%formdata=@formdata;
%formdata;
%formdata2=@formdata2;
%formdata2;


}


sub main {

@sortfields = split(/,/,$formdata{'sort'});

@required = split(/,/,$formdata{'required'});

for ($indexreq = 0; $indexreq < @required; $indexreq++) {
$myrequired = $required[$indexreq];
$myformreq = $formdata{"$myrequired"};


if ($myrequired eq "email"){
if (!$myformreq || $myformreq =~ /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/ || $myformreq !~ /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z0-9]+)(\]?)$/){
require 'error.cgi';
&missing_email;
}
}
elsif (!$myformreq){
require 'error.cgi';
&format_error;
}

}


if ($formdata{'sendreply'} eq "1"){
if (!$formdata{'email'} || $formdata{'email'} =~ /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/ || $formdata{'email'} !~ /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z0-9]+)(\]?)$/){
require 'error.cgi';
&missing_email;
}
}


if ($setokurl =~ /1/){

$url = "0";
$referer = "\L$ENV{'HTTP_REFERER'}\E";


foreach $myokurls (@okurls) {
$myokurls = "\L$myokurls\E";
if ($referer =~ /$myokurls/)
{
$url = "1";
}

}
if ( $url == 0) {
require 'error.cgi';
&bad_okurl;
}

}







if ($formdata{'datafile'}) {
$FORM_datafile = "$formdata{'datafile'}";
$ctrfile=$datafile{"$FORM_datafile"};

}else{
$ctrfile=$datafile{"1"};

}



if ($formdata{'data_format'}){
${'seperatedby'} = "$formdata{'data_format'}";
}else{
${'seperatedby'} = ",";
}

if ($formdata{'text_qualifier'} =~ 1){
${'spqualifier'} = "";
}



## START CHECK DUPLICATE ##

if ($delete_dups eq "1"){

open ( DUPFILE, "$ctrfile");
@filelines=<DUPFILE>;
close( DUPFILE );

$linectr = "@filelines";

if ($linectr =~ $formdata{'email'}){
&duplicate_email;
}

}



$thisisthecheck = "1";

if ($thisisthecheck){


if ($formdata{'outputfile'}) { ##start if output##


@outputfile = split(/,/,$formdata{'outputfile'});

open(OUT,">> $ctrfile");
eval "flock OUT,2";


for ($indexoutput = 0; $indexoutput < @outputfile; $indexoutput++) { ##start for each select output##
$myoutput = $outputfile[$indexoutput];
$myformoutput = $formdata2{"$myoutput"};

if ($myoutput eq "ipaddress"){ ## if ipaddress ##
print OUT "${'spqualifier'}$ENV{'REMOTE_ADDR'}${'spqualifier'}${'seperatedby'}";
}
elsif ($myoutput eq "date"){ ## if date ##
print OUT "${'spqualifier'}$monthnamenum/$dayofmonth/$year at $newhour:$newmin${'spqualifier'}${'seperatedby'}";
}else{
print OUT "${'spqualifier'}$myformoutput${'spqualifier'}${'seperatedby'}";
} ## end else ##




} ##end for each ##

print OUT "\n";
close (OUT);




} ##end if output##
else{ ##start else ouput##

open(OUT,">> $ctrfile");
eval "flock OUT,2";


for ($indexval = 0; $indexval < @formvalue; $indexval++) { ##start for ouput##
${'myname'} = $formname[$indexval];
${'myvalue'} = $formvalue2[$indexval];

## Check if config field ##
if (${'myname'} eq "reply_subject"|| ${'myname'} eq "subject" || ${'myname'} eq "sendreply" || ${'myname'} eq "required" || ${'myname'} eq "success_page" || ${'myname'} eq "message_format" || ${'myname'} eq "text_qualifier" || ${'myname'} eq "datafile" || ${'myname'} eq "outputfile" || ${'myname'} eq "data_format" || ${'myname'} eq "cc_to" || ${'myname'} eq "send_to" || ${'myname'} eq "plain_mesfile" || ${'myname'} eq "html_mesfile"){
$dontrun = "1";
}else{
$dontrun = "";
}

if (! $dontrun){
print OUT "${'spqualifier'}${'myvalue'}${'spqualifier'}${'seperatedby'}";
}


} ##end for ouput##

print OUT "${'spqualifier'}$ENV{'REMOTE_ADDR'}${'spqualifier'}${'seperatedby'}${'spqualifier'}$monthnamenum/$dayofmonth/$year at $newhour:$newmin${'spqualifier'}\n";

close (OUT);


} ##end else output##






for ($indexval = 0; $indexval < @formvalue; $indexval++) {
${'myname'} = $formname[$indexval];
$myname = $formname[$indexval];
${'myvalue'} = $formvalue[$indexval];

$formdata{'reply_subject'} =~s/{$myname}/${'myvalue'}/g;

}


for ($indexval = 0; $indexval < @formvalue; $indexval++) {
${'myname'} = $formname[$indexval];
$myname = $formname[$indexval];
${'myvalue'} = $formvalue[$indexval];

$formdata{'subject'} =~s/{$myname}/${'myvalue'}/g;

}


for ($indexval = 0; $indexval < @formvalue; $indexval++) {
${'myname'} = $formname[$indexval];
$myname = $formname[$indexval];
${'myvalue'} = $formvalue[$indexval];

$formdata{'success_page'} =~s/{$myname}/${'myvalue'}/g;

}


if ($formdata{'email'}){
¬ify;
}

if ($formdata{'success_page'}){
print "Location: $formdata{'success_page'}\n\n";
}else{
&success;

}

}




}


sub notify{

$FORM_sendto = "$formdata{'send_to'}";
$FORM_ccto = "$formdata{'cc_to'}";
$FINAL_sendto = $sendto{"$FORM_sendto"};
$FINAL_ccto = $cc_to{"$FORM_ccto"};


if ($formdata{'send_to'}){
$mail_sendto = "\"$reply_from_name\" <$FINAL_sendto>";
$MAIN_mail_send = "$FINAL_sendto";
}else{
$mail_sendto = "\"$reply_from_name\" <$FINAL_sendto>";
$MAIN_mail_send = "$FINAL_sendto";
}

if ($formdata{'cc_to'}){
$mail_ccto = "$FINAL_ccto";

}else{
$mail_ccto = "$FINAL_ccto";
}


$HTML_format = "text/html";
$PLAIN_format = "text/plain";

if ($formdata{'html_mesfile'}) {
$mime_html_body = &LoadFile("$formdata{'html_mesfile'}");
}else{
$mime_html_body = &LoadFile("html.mes");
}

if ($formdata{'plain_mesfile'}) {
$mime_plain_body = &LoadFile("$formdata{'plain_mesfile'}");
}else{
$mime_plain_body = &LoadFile("plain.mes");
}

$reply_subject = $formdata{'reply_subject'};


if ($formdata{'message_format'} eq "html") {

$email_format = "$HTML_format";
$mime_body = "$mime_html_body";


}else{

$email_format = "$PLAIN_format";
$mime_body = "$mime_plain_body";

}



### CHECKS SEND TYPE ###

if ($useLib eq "sendmail") {
require 'sendmail.cgi';
&sdsmail;
}else{
require 'smtp.cgi';
&sdsmtp;
}

}


sub duplicate_email {

if ($formdata{'success_page'}){
print "Location: $formdata{'success_page'}\n\n";
exit;
}else{
require 'error.cgi';
&success;
}

}


sub LoadFile {
my($filename) = @_;
my($result);

if (! -e $filename) {
return $result;
} # if

open(FILE, "<$filename");
my(@lines) = <FILE>;
close FILE;

my($line);
foreach $line (@lines) {
$result = $result . $line;
} # foreach


for ($indexval = 0; $indexval < @formvalue; $indexval++) {
${'myname'} = $formname[$indexval];
$myname = $formname[$indexval];
${'myvalue'} = $formvalue[$indexval];

$result =~s/{$myname}/${'myvalue'}/g;

}


return $result;
}

s



Reply To This Topic

Subject
Message  
Username
Password
Due to unrelated post's, you must have an
account to post a message. To Sign Up click here.




Copyright 2000-2010 Seth M. Knorr,
BizMailForm.com Forms Processor, All Rights Reserved