Skip to main content
April 11, 2007
Question

Earthlink CGI script and Flash

  • April 11, 2007
  • 95 replies
  • 24236 views
I've created a contact form in Flash and the script can't find the URL at Earthlink. I've talked to EL and they said use the EL CGI html code and incorporate in the Flash script. I tried a multitude of ways and get constant syntax errors. My code has no errors but can't find the URL. I've attached my code and Earthlink's sample code. Can someone show me where to put what?
Thanks for any and all help.

Earthlink's code:
<h1>Sample Form</h1>
<hr>
<form method="post" action=" http://www.domain.com/cgi-bin/mailto"> 
<input type="hidden" name="RECIPIENT" value="user@domain.com"> 
<input type="hidden" name="THANKURL" value=" http://www.domain.com/thankyou.html"> 
<p> 
<b>Name:</b><input type="text" name="name" size="30"><br> 
<b>Email:</b><input type="text" name="email" size="30"><p> 
<b>Comments:</b><br> 
<textarea name="comments" rows="10" cols="50"></textarea>
<p> 
<input type="submit" value="Send"> 
<input type="reset" value="Clear"> 
</form> 
<p>


My Flash Code:
stop();

send_btn.onRelease = function() {
var my_lv:LoadVars = new LoadVars();

my_lv.firstName = firstName_txt.text;
my_lv.lastName = lastName_txt.text;
my_lv.email = email_txt.text;
my_lv.phone = phone_txt.text;

if (firstName_txt.text != "" && lastName_txt.text != "" && email_txt.text != "" && comments_txt.text != "")
{
my_lv.send(" http://www.domain.us/cgi-bin/mailto:me@domain.us","_blank","POST");
gotoAndStop("success");
}
else
{
gotoAndStop("error");
}
}
This topic has been closed for replies.

95 replies

April 17, 2007
No, it's not in the DVL folder. I even tried it with the -bin removed from the cgi-bin (as EL suggests) path and got a "death threat" message!
Actually it said: 500 Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the site administrator and inform them of the time the error occured and anything you might have done that may have caused the error.
kglad
Community Expert
Community Expert
April 17, 2007
is your swf back in that dvl folder? if so, explain the folder set-up to your swf and to your cgi folder.
April 17, 2007
This is the error message: The requested URL /cgi-bin/FormMail.pl was not found on this server.
kglad
Community Expert
Community Expert
April 17, 2007
that's not the formmail.pl script i'm familiar with from matt's script archive. but you can give it a try. i'd change @recipients though:

@recipients = ('^db\@davidbrewer\.com');

rename the file and remove the .txt to create FormMail.pl.
recheck its permissions.

you can use the same flash file but change

lv.RECIPIENT to lv.recipient

and remove

lv.THANKURL

and use:

lv.send("cgi-bin/FormMail.pl","POST");



April 17, 2007
OK, the FormMail.pl (it kept adding a.txt extention after .pl. Is this OK?or should i remove it?) I've changed the permissions to rwx r-x r-x. What I changed is pasted below:
# 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 = 1;
$emulate_matts_code= 0;
$secure = 1;
$allow_empty_ref = 1;
$max_recipients = 1;
$mailprog = '/usr/lib/sendmail -oi -t';
$postmaster = 'db@davidbrewer.com';
@referers = qw();
@allow_mail_to = qw(db@davidbrewer.com);
@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 = 0;
$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)
}
kglad
Community Expert
Community Expert
April 17, 2007
you're welcome. (don't forget to set permissions on formmail.pl after you upload it.)
April 16, 2007
This might take me a while. I'll post it in your AM. Thanks.
kglad
Community Expert
Community Expert
April 16, 2007
no, i'm in pdt.

go ahead and load formmail.pl into your cgi folder. read the comments at the beginning of formmail.pl, make the changes necessary for your use and paste the first 50 or 100 lines of formmail.pl here AFTER you make your changes.
April 16, 2007
Wondering what time zone you're in? I'm in EDT. Just so we're typing in your time zone.
April 16, 2007
Yes. formmail.pl 3.14