Gossamer Forum
Home : Products : Links 2.0 : Customization :

Recommend it mod

(Page 2 of 3)
> > > >
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
?
> > > >