Weird error after a configuration change

S

skieros

I have this part of script:

##############################################################
my $action = param('action');
#============ REDIRECT TO PROPER SCRIPT ===================
if( ($action eq 'ΑπΞÎστΞÎλή!') && ($ENV{HTTP_REFERER} =~ /
index/) )
##############################################################

and iam gettign thsi error now:

[Fri Apr 27 22:28:11 2007] [error] [client 10.0.0.2] [Fri Apr 27
22:28:11 2007] admin.pl: Use of uninitialized value in string eq at D:\
\www\\cgi-bin\\admin.pl line 26., referer: http://dell/

Line 26 is the line with if.
All this happened when i deleted the d:\www\index.html file which was
pointing to d:\www\cgi-bin\index.pl and set apache to load /cgi-bin/
index.pl directly.
 
B

Brian McCauley

I have this part of script:

##############################################################
my $action = param('action');
#============ REDIRECT TO PROPER SCRIPT ===================
if( ($action eq 'ΑπΞÎστΞÎλή!') && ($ENV{HTTP_REFERER} =~ /
index/) )
##############################################################

and iam gettign thsi error now:

[Fri Apr 27 22:28:11 2007] [error] [client 10.0.0.2] [Fri Apr 27
22:28:11 2007] admin.pl: Use of uninitialized value in string eq at D:\
\www\\cgi-bin\\admin.pl line 26., referer:http://dell/

Hmmm... that's usually a warning. Do you perhaps have as use warnings
FATAL in your code?
Line 26 is the line with if.
All this happened when i deleted the d:\www\index.html file which was
pointing to d:\www\cgi-bin\index.pl and set apache to load /cgi-bin/
index.pl directly.

LOL!

So you are saying that "all you did" was to remove the referring page
and access the CGI script via a _direct_ URL (i.e. no referrer).

And now when your script tries to perform an operation on the address
of the referring page it finds that this is data item is undefined.

Well yes, er, it would.

This, of course, has nothing to do with Perl.
 
B

Brian McCauley

I have this part of script:
##############################################################
my $action = param('action');
#============ REDIRECT TO PROPER SCRIPT ===================
if( ($action eq 'ΑπΞÎστΞÎλή!') && ($ENV{HTTP_REFERER} =~ /
index/) )
##############################################################
and iam gettign thsi error now:
[Fri Apr 27 22:28:11 2007] [error] [client 10.0.0.2] [Fri Apr 27
22:28:11 2007] admin.pl: Use of uninitialized value in string eq at D:\
\www\\cgi-bin\\admin.pl line 26., referer:http://dell/

Hmmm... that's usually a warning. Do you perhaps have as use warnings
FATAL in your code?
Line 26 is the line with if.
All this happened when i deleted the d:\www\index.html file which was
pointing to d:\www\cgi-bin\index.pl and set apache to load /cgi-bin/
index.pl directly.

LOL!

Sorry, I was laughing so hard I actually got it totally wrong.

Oops.

I now see there _was_ apparently a referer and the error was
complaining about $action.

So what was the URL you used to access the script? Did it in fact
contain a value for action?
This, of course, has nothing to do with Perl.

This, indeed, is probably still true.
 
S

skieros

I have this part of script:
##############################################################
my $action = param('action');
#============ REDIRECT TO PROPER SCRIPT ===================
if( ($action eq 'ΑπΞÎστΞÎλή!') && ($ENV{HTTP_REFERER} =~ /
index/) )
##############################################################
and iam gettign thsi error now:
[Fri Apr 27 22:28:11 2007] [error] [client 10.0.0.2] [Fri Apr 27
22:28:11 2007] admin.pl: Use of uninitialized value in string eq at D:\
\www\\cgi-bin\\admin.pl line 26., referer:http://dell/

Hmmm... that's usually a warning. Do you perhaps have as use warnings
FATAL in your code?

#!/usr/bin/perl -w
use strict;
use CGI::Carp qw(fatalsToBrowser);
LOL!

So you are saying that "all you did" was to remove the referring page
and access the CGI script via a _direct_ URL (i.e. no referrer).

And now when your script tries to perform an operation on the address
of the referring page it finds that this is data item is undefined.

Well yes, er, it would.

This, of course, has nothing to do with Perl.

But its a perl error and also admin.pl receives data from index.pl and
check if a param is passed.
my $action = param('action');
 
N

Nikos

I have this part of script:
##############################################################
my $action = param('action');
#============ REDIRECT TO PROPER SCRIPT ===================
if( ($action eq 'ΑπΞÎστΞÎλή!') && ($ENV{HTTP_REFERER} =~ /
index/) )
##############################################################
and iam gettign thsi error now:
[Fri Apr 27 22:28:11 2007] [error] [client 10.0.0.2] [Fri Apr 27
22:28:11 2007] admin.pl: Use of uninitialized value in string eq at D:\
\www\\cgi-bin\\admin.pl line 26., referer:http://dell/
Hmmm... that's usually a warning. Do you perhaps have as use warnings
FATAL in your code?

Sorry, I was laughing so hard I actually got it totally wrong.

Oops.

I now see there _was_ apparently a referer and the error was
complaining about $action.

So what was the URL you used to access the script? Did it in fact
contain a value for action?
This, of course, has nothing to do with Perl.

This, indeed, is probably still true.

ok, $action actually was NOT undefined it was that i had it as $action
= param('something_else_and not correct_var') so i wasnt checking for
the correct posted variable, no error now, except the fact that
referer is stil 'http://dell' although index.pl posts data to
admin.pl....

As matter of fact i tried to pritn the referrrer var in every script
of mine called by another perl cgi script and every tiem the result
was http://dell why?!!
 
B

Brian McCauley

referer is stil 'http://dell'although index.pl posts data to
admin.pl....

As matter of fact i tried to pritn the referrrer var in every script
of mine called by another perl cgi script and every tiem the result
washttp://dell why?!!

This is possibly a feature of the browser you are using. The browser
can send whtever it likes as a referer.
 
N

Nikos

This is possibly a feature of the browser you are using. The browser
can send whtever it likes as a referer.

i want it when i post data from index.pl to admin pl to says the
referrer is index.pl nto dell
 
N

Nikos

Line 26 is the line with if.
All this happened when i deleted the d:\www\index.html file which was
pointing to d:\www\cgi-bin\index.pl and set apache to load /cgi-bin/
index.pl directly.

http://perlmonks.org/?node_id=612668

Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,

ok
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,139
Messages
2,570,805
Members
47,351
Latest member
LolaD32479

Latest Threads

Top