Gossamer Forum
Home : Products : Links 2.0 : Customization :

Recommend it mod

Quote Reply
Recommend it mod
I can`t get the Recommend IT mod to work. The server sends me an error (500) I cannot see what it says in my server error log.

Could somebody put the script up here, where are done all the modifications. Maybe I am doing something worng?

http://www.orphanage.com/goodstuff/recommend_mod2.html
Quote Reply
Re: [TomJ] Recommend it mod In reply to
Check the syntax of the script...

Code:

perl -c recommend.cgi


via telnet.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [AnthroRules] Recommend it mod In reply to
could you or somebody else explain me, what that means? I really need to get that script working today. Frown
Quote Reply
Re: [TomJ] Recommend it mod In reply to
You need to log into your site via Telnet (type 'telnet' from the run command in Windows), and then enter your login info for your site (normally the same as your FTP info).

The type 'cd foldername'

Obviously change the part saying 'foldrename' to the actual name of the folder. Then just work your way to the directory where the script is (you can check where you are by entering 'pwd')

Once you are there, the type in the command you were given earlier.

NOTE: Not all hosting accounts offer Telnet, so dont be surprised if it doesnt let you use it!

Andy

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Post deleted by youradds In reply to
Quote Reply
Re: [youradds] Recommend it mod In reply to
yeah, I can`t use telnet. Could somebody make the modification to the script on put it up here for me?
I know, I am doing something wrong. I have tried to put it up 4 or 5 times, but it never works. Please somebody help me.
Quote Reply
Re: [TomJ] Recommend it mod In reply to
Do you have access to your error logs? If so, what do the last few lines say?

Andy

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [youradds] Recommend it mod In reply to
No, I don`t
Post deleted by youradds In reply to
Quote Reply
Re: [TomJ] Recommend it mod In reply to
Ok. I dont really know what else to suggest. If we dont know the error reported there is little chance we can fix it. Try posting the code (including variables you may have to set) and we will see if there is anything obviouse. You may also want to check the location to Perl is correct (may sound stupid, but people do it all the time! including me Wink)

Andy

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [youradds] Recommend it mod In reply to
On one of the servers I use if you set the file to .pl it gives a 500 error.
Are you sure you are using the correct extension on the file?
Have you checked the location of the Perl interpreter?
Have you checked the location of sendmail?
Have you checked that the script location and other variables truly reflect your server configuration?

I once spent a 2 weeks trying to get a script to work and found I'd left out something really basic - which is the most common error...
Blacknight Solutions - Hosting
Search.ie
Armchair.ie
Quote Reply
Re: [blacknight] Recommend it mod In reply to
I have checked all those thing DOUBLE!!!
Quote Reply
Re: [TomJ] Recommend it mod In reply to
most the 500 errors I get are html related. possibly you missed something when doing the mod.
I'm sure that's what alot of the folks here are suggesting. You might just missed adding a line or accidently erased something.

Also, when do you get the error?

running the script
going through the admin
when clicking on recommend it


errr .... is sendmail or whatever mail server set properly? adding to which, can you send email through you hosted server?

frustrating isn't it, when a server doesn't let you use telnet/see the error logs ... this is 1 reason why I moved to a different hosting service.

good luck, take a deep breath and pull your hair out ...something might work

openoffice + gimp + sketch ... Smile
Quote Reply
Re: [QooQ] Recommend it mod In reply to
Quote:
most the 500 errors I get are html related

Wrong...very incorrect statement...most internal server errors are caused by the following:

1) Wrong perl path
2) Wrong full path referencing required files
3) Not closing operators/brackets/etc.
4) Wrong file permission setting

But not HTML...where did you get that idea? Wink
========================================
Buh Bye!

Cheers,
Me

Last edited by:

AnthroRules: Sep 15, 2001, 8:29 AM
Quote Reply
Re: [AnthroRules] Recommend it mod In reply to
Links2 uses html within perl scripts so it is very easy to cause errors when editing HTML - I think that is what QOOQ means Tongue

Last edited by:

PaulWilson: Sep 15, 2001, 9:04 AM
Quote Reply
Re: [PaulWilson] Recommend it mod In reply to
Yes, that's what I mean ....

I also stated "most the 500 errors I get ... " I was stating for myself ... sorry if there was a misunderstanding. But I do get this type of error Myself ...



3) Not closing operators/brackets/etc. --- for clarification does etc ... also refer to html ??? I'm not very clear on this ???

I'm sorry if I butted in on a thread, I login at different times than most of you and since TomJ said he checked those double, I figured adding a little of my own "little" experience wouldn't hurt.

openoffice + gimp + sketch ... Smile
Quote Reply
Re: [QooQ] Recommend it mod In reply to
Operators like...

qq||;
qq~~;
"";

That are included in print statements, which are Perl codes...

The problem resides if you neglect to close the operators...like:

print qq|learn perl
print qq~learn perl
print "learn perl

Also, if you use older versions of Perl coding like:

print "<html><head><title>something</title></head><body bgcolor="FFFFFF">";

And you do not escape the double quotes in the HTML codes, then you will get INTERNAL SERVER ERRORS...due to MALFORMATTED PERL codes, NOT HTML codes.

BUT...for many MODS and also the TEMPLATE version of LINKS 2.0, this is a null point, since the HTML codes are separated from the Perl scripts. But if you do not properly code the TAGS in the template files, then problems will arise.

Hope this makes more sense.

Bye.

========================================
Buh Bye!

Cheers,
Me

Last edited by:

AnthroRules: Sep 15, 2001, 7:01 PM
Quote Reply
Re: [AnthroRules] Recommend it mod In reply to
thanks Smile

actually, I'm actually studying right now ... it's a slow process but working away at my introductory book, next step hopefully will be the CAMEL ... or is the LAMA better ???

also, being corrected and helping at the forums is very useful for actual learning. That's why I'm here so often and post so much ...

thanks again !!!

openoffice + gimp + sketch ... Smile
Quote Reply
Re: [AnthroRules] Recommend it mod In reply to
Quote:
BUT...for many MODS and also the TEMPLATE version of LINKS 2.0, this is a null point, since the HTML codes are separated from the Perl scripts.

Apart from site_html_print_cat and all the html in nph-build.cgi

Last edited by:

PaulWilson: Sep 15, 2001, 7:29 PM
Quote Reply
Re: [PaulWilson] Recommend it mod In reply to
Again...errors are due to improperly formatting PERL codes, Paul...not the HTML codes themselves...Wink
========================================
Buh Bye!

Cheers,
Me

Last edited by:

AnthroRules: Sep 15, 2001, 7:10 PM
Post deleted by PaulWilson In reply to

Last edited by:

PaulWilson: Sep 15, 2001, 7:15 PM
Post deleted by PaulWilson In reply to

Last edited by:

PaulWilson: Sep 15, 2001, 7:24 PM
Quote Reply
Re: [AnthroRules] Recommend it mod In reply to
War of the Guru's...gotta love these ones.... Wink

Anyone of you guru's want to tell me how to get the expirator mod to show the "Date" and not the "Number of Days"???

Smile

I had too, none of you perl greats want to try and help me on my numerous posts....so, thought I would slip this one it...lol

dunno

God Bless our Great Nation

God Bless every Family involved in the Tragedy

God Bless all Rescue Efforts

God Bless Peace on Earth


Quote Reply
Re: [TomJ] Recommend it mod In reply to
HI,

If you can pm me your ftp info I'll fix the error for you in the morning. (4am now)
Quote Reply
Re: [PaulWilson] Recommend it mod In reply to
Going to help me too Paul?? LaughSlyWinkCool

dunno

God Bless our Great Nation

God Bless every Family involved in the Tragedy

God Bless all Rescue Efforts

God Bless Peace on Earth


Quote Reply
Re: [dunno] Recommend it mod In reply to
Could somebody make the modification and put it up here for me? Please! Smile
Quote Reply
help In reply to
now, I got the script almost running. No errors, but when I go /birdcast.cgi?ID=2

the script tells me:
Sorry, cant run it from here....

help?
thanks in advance!
Quote Reply
Re: [TomJ] help In reply to
The problem is with the HTTP_REFERER variable config in the birdcast,cgi script...you have not specified your domain, thus the script cannot run,

Got it?

========================================
Buh Bye!

Cheers,
Me

Last edited by:

AnthroRules: Sep 16, 2001, 8:36 AM
Quote Reply
Re: [AnthroRules] help In reply to
i defined my domain...
Quote Reply
Re: [AnthroRules] help In reply to
I am really pissed off... I just can`t get the script to work. It give me the text : Can`t run script from here.

i defined my domain...

@okaydomains=("http://tomj.com", "http://www.tomj.com");
Quote Reply
Re: [TomJ] help In reply to
No need to get snotty, Tom!

You have IMPROPERLY DEFINED the domains in the that ARRAY (if you
had compared the configurations you have in the @db_referer in
the links.cfg file, you would've seen your ERROR)...

The array needs to be configured as follows:

Code:

@okaydomains = ('tomj.com','www.tomj.com');


Got it??

Next time, a little more respect will go a long way!
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [AnthroRules] help In reply to
Tom, if you could post the referer code then I can try to help but it is difficult without seeing what code you have.
Quote Reply
Re: [PaulWilson] help In reply to
He already did, Paul...

Quote:

@okaydomains=("http://tomj.com", "http://www.tomj.com");


Shocked
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [AnthroRules] help In reply to
My eyesight isn't that bad ;)

I was refering to the code that checks the referer not the array of referers.
Quote Reply
Re: [PaulWilson] help In reply to
AnthroRules - your version did not help too?

and Paul, I didn`t understand what code do you want to see... ???

Quote Reply
Re: [TomJ] help In reply to
The code that checks the referer and produces the error page that is causing your problem.
Quote Reply
Re: [PaulWilson] help In reply to
ok, here is the code...
i am sure, that now you want to see again my domain information... :

i tried two different, but it gives the same error

@okaydomains = ('http://tomj.net','www.tomj.net');
@okaydomains = ('tomj.net','www.tomj.net');

the last one is by AnthroRules

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 it from here....";
exit;
}
}

Last edited by:

TomJ: Sep 17, 2001, 8:28 AM
Quote Reply
Re: [TomJ] help In reply to
Yikes.....

Try something like:
Code:
sub valid_page {
print "Content-type: text/html\n\n";
foreach (@okaydomains) {
$ENV{HTTP_REFERER} =~ /^$_/i and $ok = 1;
} else {
$ok = 0;
}
if ($ok < 1) {
print "Sorry, cant run it from here....";
exit;
}
}

@okaydomain = ('http://www.mydomain.com/cgi-bin/birdcast.cgi','http://mydomain.com/cgi-bin/birdcast.cgi');

Last edited by:

PaulWilson: Sep 17, 2001, 8:35 AM
Quote Reply
Re: [PaulWilson] help In reply to
Paul,

My experience when I used to use Birdcast about two years ago,
was that the domain checking codes were just fine. The error
that Tom is reporting is caused by not properly configuring
the @okaydomains array.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [AnthroRules] help In reply to
PaulWilson, I did everything what you wrote, but it still did not work: i got a server internal error (500)

premature end of script headers

oh yeah, you wrote okdomain but I think it is okdomainS
Quote Reply
Re: [AnthroRules] help In reply to
You know what I did too fix that problem??? Smile

@okaydomains=("http://tomj.com", "http://www.tomj.com");


I put a big ol fat ##### in front of it.

Cut it right out, and it works fine. Does anyone actually think people are going to cut into the script and use it for their own? Hmm....maybe in rare cases.

If so, then figure it out. But to test the script, cut that sucker out, till you get it working.

It's not like it is a security threat......is it? lol

dunno

God Bless our Great Nation

God Bless every Family involved in the Tragedy

God Bless all Rescue Efforts

God Bless Peace on Earth


Quote Reply
Re: [dunno] help In reply to
I cut the okdomains... blabla out, but it gives me the internal server error

Premature end of script headers Unsure
Quote Reply
Re: [dunno] help In reply to
Sorry I missed a bracket:

Code:
sub valid_page {
print "Content-type: text/html\n\n";
foreach (@okaydomains) {
if ($ENV{HTTP_REFERER} =~ /^$_/i) {
$ok = 1;
} else {
$ok = 0;
}
}
if ($ok < 1) {
print "Sorry, cant run it from here....";
exit;
}
}

Last edited by:

PaulWilson: Sep 17, 2001, 10:44 AM
Quote Reply
Re: [PaulWilson] help In reply to
text...
Sorry, cant run it from here.... ???
Quote Reply
Re: [TomJ] help In reply to
Ok try a bit of debugging........

Code:
sub valid_page {
print "Content-type: text/html\n\n";
foreach (@okaydomains) {
if ($ENV{HTTP_REFERER} =~ /^$_/i) {
$ok = 1;
} else {
$ref = $_;
$ok = 0;
}
}
if ($ok < 1) {
print "Sorry, cant run it from here...Current referer : $ENV{HTTP_REFERER}";
exit;
}
}

Last edited by:

PaulWilson: Sep 17, 2001, 11:14 AM
Quote Reply
Re: [PaulWilson] help In reply to
Sorry, cant run it from here...Current referer :
???
Quote Reply
Re: [TomJ] help In reply to
Well looks like no referer is being set so you must be calling it straight from your browser?

I think the easiest solution is just get rid of that code
Quote Reply
Re: [PaulWilson] help In reply to
Could you maybe give me some instructions witch code I have to remove?
Quote Reply
Re: [TomJ] Recommend it mod In reply to
I have the same problem. Can somebody help US?
Quote Reply
Re: [webber] Recommend it mod In reply to
?
Quote Reply
Re: [webber] Recommend it mod In reply to
Ok, It seems like nobody here can help me...
Is there maybe any way to add a user comments field to glennus Tella Friend 2 mod? Frown
Quote Reply
Re: [TomJ] Recommend it mod In reply to
Please, I know I am really spamming here, but really, nobody can help me? I am desperate... I few days more and I`ll... Pirate
Quote Reply
Re: [TomJ] Recommend it mod In reply to
ok, RedRum or somebody... pleez...
[TomJ crying]

Unsure Pirate Pirate
Quote Reply
Re: [TomJ] Recommend it mod In reply to
UnsureUnsureUnsureUnsure