Weird error after a configuration change

Discussion in 'Perl Misc' started by skieros, Apr 27, 2007.

  1. skieros

    skieros Guest

    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.
    skieros, Apr 27, 2007
    #1
    1. Advertising

  2. On Apr 27, 8:33 pm, skieros <> wrote:
    > 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.
    Brian McCauley, Apr 27, 2007
    #2
    1. Advertising

  3. On Apr 27, 8:56 pm, Brian McCauley <> wrote:
    > On Apr 27, 8:33 pm, skieros <> wrote:
    >
    > > 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.
    Brian McCauley, Apr 27, 2007
    #3
  4. skieros

    skieros Guest

    On Apr 27, 10:56 pm, Brian McCauley <> wrote:
    > On Apr 27, 8:33 pm, skieros <> wrote:
    >
    > > 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);

    > > 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.


    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');
    skieros, Apr 27, 2007
    #4
  5. skieros

    Nikos Guest

    On Apr 27, 11:00 pm, Brian McCauley <> wrote:
    > On Apr 27, 8:56 pm, Brian McCauley <> wrote:
    >
    >
    >
    > > On Apr 27, 8:33 pm, skieros <> wrote:

    >
    > > > 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.


    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?!!
    Nikos, Apr 28, 2007
    #5
  6. On Apr 28, 12:40 am, Nikos <> wrote:
    > 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.
    Brian McCauley, Apr 28, 2007
    #6
  7. skieros

    Nikos Guest

    On Apr 28, 8:41 pm, Brian McCauley <> wrote:
    > On Apr 28, 12:40 am, Nikos <> wrote:
    >
    > > referer is stil 'http://dell'althoughindex.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://dellwhy?!!

    >
    > 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
    Nikos, Apr 29, 2007
    #7
  8. skieros

    Nikos Guest

    On Apr 29, 11:00 pm, Michele Dondi <> wrote:
    > On 27 Apr 2007 12:33:31 -0700, skieros <> wrote:
    >
    > >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
    Nikos, Apr 30, 2007
    #8
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Luis Esteban Valencia

    Change configuration files after installation.

    Luis Esteban Valencia, Jul 12, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    595
    Luis Esteban Valencia
    Jul 12, 2005
  2. Mark
    Replies:
    0
    Views:
    800
  3. Big Daddy

    Weird security configuration message

    Big Daddy, Aug 20, 2010, in forum: ASP .Net
    Replies:
    3
    Views:
    582
    Brian Cryer
    Jan 21, 2011
  4. dorayme
    Replies:
    1
    Views:
    604
    richard
    Jan 21, 2011
  5. richard
    Replies:
    0
    Views:
    572
    richard
    Jan 21, 2011
Loading...

Share This Page