Gossamer Forum
Home : Products : Links 2.0 : Customization :

Problems with "Recommend It" Mod

Quote Reply
Problems with "Recommend It" Mod
Hi guys... I'm having some problems setting up this "Recommend It" / Birdcast 2.0 mod for Links 2 and was hoping somebody might be able to help me out. I've been messing with it for a while now and can't seem to get it working.

I've modified the Birdcast script, following the step by step instructions here:

http://goodstuff.orphanage.com/recommend_mod2.html

For some reason, though, whenever I try to recommend a link I get an annoying HTTP 500 error when it attempts to access the cgi file. The permissions are correct on everything, and I've checked all of the paths at least three times. I even went through and did all of the modifications to Birdcast.cgi all over again... still not working.

I logged into my server using Telnet and ran the recommend script with perl... it spit out the following error (which I'm not even sure is causing the HTTP 500 errors):

In Reply To:
Can't find string terminator "__STOP_OF_MAIL__" anywhere before EOF at birdcast.cgi line 115.
Here is the section of code that is having the problem according to Perl:

In Reply To:
sub process_mail
{
for ($i=1;$i<$MAXNUM+1;$i++)
{
$recipname="recipname_$i";
$recipemail="recipemail_$i";
if ($fields{$recipemail} eq "")
{
next;
}
if (&valid_address == 0)
{
next;
}

#BNB SAYS! You can modify the Subject line below.

$subject = "A link from your friend $fields{'send_name'}";

#BNB SAYS! Modify the lines below between the lines marked
# with __STOP_OF_MAIL__ to customize your e-mail message
# DO NOT remove the lines that contain __STOP_OF_MAIL__!
# If you enter any hardcoded e-mail addresses, BE SURE TO
# put the backslash before the at sign, ie, me\@here.net

$msgtxt = <<__STOP_OF_MAIL__;
Hi $fields{$recipname},

$fields{'send_name'} stopped by $SITE_NAME
and suggested that you visit the following URL:

Site Name: $rec{'Title'}
Site Location: $rec{'URL'}
Site Description: $rec{'Description'}

__STOP_OF_MAIL__

if ($fields{'message'} ne "")
{
$msgtxt .= "Here is their message....\n";
$msgtxt .= "$fields{'message'}\n\n";
}
$msgtxt .= "$SITE_NAME\n";
$msgtxt .= "$ENDLINE\n";
$msgtxt .= "$SITE_URL\n\n";
$mailresult=&sendmail($fields{send_email}, $fields{send_email},
$fields{$recipemail}, $SMTP_SERVER, $subject, $msgtxt);

if ($mailresult ne "1")
{print "Content-type: text/html\n\n";
print "MAIL NOT SENT. SMTP ERROR: $mailresult\n";
exit
}

}
}
I searched through some of the archived posts from this board and noticed that some other people were having problems with internal server errors as well, but I couldn't find any kind of solution. Anyway, if anyone thinks they can help out, I'd appreciate it a lot. Thanks.

-Tom

Subject Author Views Date
Thread Problems with "Recommend It" Mod Tomee 1217 Sep 3, 2000, 8:54 PM
Post Re: Problems with "Recommend It" Mod
rotovegas 1179 Sep 3, 2000, 11:50 PM
Post Re: Problems with "Recommend It" Mod
Tiggr 1176 Sep 4, 2000, 4:08 AM