Loading ...
Sorry, an error occurred while loading the content.

Apache::ASP encounters with OpenBSD

Expand Messages
  • Peter Galbavy
    I have tried looking through the mail archives and didn t fir anything that quite matches my problems. I may have one problem and many symptoms or many
    Message 1 of 5 , Dec 10, 2002
    • 0 Attachment
      I have tried looking through the mail archives and didn't fir anything that
      quite matches my problems. I may have one problem and many symptoms or many
      problems. Please please help...

      First, before anyone points this out, I am the maintainer of both mod_perl
      and Apache::ASP in the OpenBSD ports tree - this does not mean I know what I
      am doing :-)



      Set-up is OpenBSD/i386 (both 3.2 and -current - Apache/1.3.27), mod_perl
      1.27 and Apache::ASP 2.49 with this one patch:

      --- ASP.pm.orig Fri Nov 22 13:12:02 2002
      +++ ASP.pm Fri Nov 22 13:12:11 2002
      @@ -537,7 +537,7 @@ sub FileId {
      my @inode_stat = ();
      if($self->{inode_names}) {
      @inode_stat = stat($file);
      - unless($inode_stat[0] && $inode_stat[1]) {
      + unless($inode_stat[0] || $inode_stat[1]) {
      @inode_stat = ();
      }
      }


      What I am hoping for is any instances of people saying that this stuff
      sounds familir or that it is fixed in next release :)


      The symptoms, indicating maybe one or maybe more problems;

      1. I get many many instances of:

      Use of uninitialized value in split at
      /usr/local/libdata/perl5/site_perl/Apache
      /ASP/Response.pm line 938 during global destruction.

      This is:

      my $new_query = join('&',
      (map {
      >>> /^$Apache::ASP::SessionCookieName\=/ ?
      '' : $_
      }
      split(/&/, $query)
      ),

      $Apache::ASP::SessionCookieName.'='.$asp->{session_id}
      );

      It appears that $query is actually the variable undefined - probably because
      the regexp "$rel_url =~ /^([^\?]+)(\?([^\#]*))?(\#.*)?$/)" is failing for
      '(\#.*)?' and not setting $3 a few lines above. Not sure entirely if this is
      a real URI or a special internal one...

      if there isn't a problem with the regexp, then there is with the following
      lines:

      $new_url = $1;
      $query = $3;
      $frag = $4; <<< ... there is no 4th () in the regexp...

      Maybe these should be $1, $2, $3 ??? Yep, that looks right re-reading this
      e-mail... going to hand patch it and see how it goes.

      Hang on. No, wait. There is a nested paren up there... WTF does that mean in
      per WRT $1 etc. ??? I will go off and read 'man perlre' I think.


      2. Quite a few:

      Use of uninitialized value in string eq at
      /usr/local/libdata/perl5/site_perl/Ap
      ache/ASP/Session.pm line 236 during global destruction.

      This is:

      sub NEXTKEY {
      my($self, $key) = @_;
      >>> my $value = $self->{state}->NEXTKEY($key);
      if($value eq '_UA') {
      $self->{state}->NEXTKEY($value);
      } else {
      $value;
      }
      }

      Without reading all the Tie'd code, I am guessing the next line should
      actually read "if(defined $value && $value eq '_UA') {" ???

      Will also, in ignorance of side effects, try this locally.

      3. SEGV:

      I am getting a number of:

      [Tue Dec 10 08:50:09 2002] [notice] child pid 161 exit signal Segmentation
      fault
      (11)

      Haven't looked at the core files yet. Will do soon. Not much else to go on.

      4. 'Missing' environment

      Maybe related to the SEGV above, but I am seeing occasional failures in .asp
      files to see any environment or ASP objects. I have code that does this:

      <% if (!defined $r->path_info) { %>
      No category chosen.
      ...
      <% } else { %>

      But the URL most DEFINITELY had PATH_INFO... the access_log entries say
      so...
      could be 1. and/or 2. above.


      rgds,
      --
      Peter


      ---------------------------------------------------------------------
      To unsubscribe, e-mail: asp-unsubscribe@...
      For additional commands, e-mail: asp-help@...
    • Peter Galbavy
      ... in ... +++ lib/Apache/ASP/Response.pm Tue Dec 10 11:58:38 2002 @@ -925,10 +925,10 @@ sub SessionQueryParseURL { ) { my($query, $new_url, $frag); -
      Message 2 of 5 , Dec 10, 2002
      • 0 Attachment
        > 1. I get many many instances of:
        >
        > Use of uninitialized value in split at
        > /usr/local/libdata/perl5/site_perl/Apache
        > /ASP/Response.pm line 938 during global destruction.
        ...
        > Hang on. No, wait. There is a nested paren up there... WTF does that mean
        in
        > per WRT $1 etc. ??? I will go off and read 'man perlre' I think.

        The patch that *appears* to work is:

        --- lib/Apache/ASP/Response.pm.orig Tue Nov 5 21:52:23 2002
        +++ lib/Apache/ASP/Response.pm Tue Dec 10 11:58:38 2002
        @@ -925,10 +925,10 @@ sub SessionQueryParseURL {
        )
        {
        my($query, $new_url, $frag);
        - if($rel_url =~ /^([^\?]+)(\?([^\#]*))?(\#.*)?$/) {
        + if($rel_url =~ /^([^\?]+)\?([^\#]*)(\#.*)?$/) {
        $new_url = $1;
        - $query = $3;
        - $frag = $4;
        + $query = $2;
        + $frag = $3;
        } else {
        $new_url = $rel_url;
        $query = '';


        I tested with cookies enabled and blocked. No more errors and URLs look as
        expected.

        Peter


        ---------------------------------------------------------------------
        To unsubscribe, e-mail: asp-unsubscribe@...
        For additional commands, e-mail: asp-help@...
      • Peter Galbavy
        ... .asp ... Found this one. It is a Javascript issue. See http://www.webreference.com/dhtml/hiermenus/issues/ for a commentary. Basically, I have boxes
        Message 3 of 5 , Dec 10, 2002
        • 0 Attachment
          > 4. 'Missing' environment
          >
          > Maybe related to the SEGV above, but I am seeing occasional failures in
          .asp
          > files to see any environment or ASP objects. I have code that does this:
          >
          > <% if (!defined $r->path_info) { %>
          > No category chosen.
          > ...
          > <% } else { %>
          >
          > But the URL most DEFINITELY had PATH_INFO... the access_log entries say
          > so...
          > could be 1. and/or 2. above.

          Found this one. It is a Javascript issue. See
          http://www.webreference.com/dhtml/hiermenus/issues/ for a commentary.
          Basically, I have <td> boxes (enclosing href text) that use Javascript
          location.href to make the link work when you click anywhere in the cell.
          This results in the request NOT being treated as a referred link, but a new
          request.

          Time to turn cell links into graphics or text only...

          I didn't know this and I got bitten. Maybe this will help anyone looking
          through the mail archives.

          Peter


          ---------------------------------------------------------------------
          To unsubscribe, e-mail: asp-unsubscribe@...
          For additional commands, e-mail: asp-help@...
        • Peter Galbavy
          ... Let me rephrase that; I found one contributory reason. The missing path info appears to be related in some way to the SEGV problem. Will deal with this in
          Message 4 of 5 , Dec 10, 2002
          • 0 Attachment
            > Found this one. It is a Javascript issue. See

            Let me rephrase that; I found one contributory reason.

            The missing path info appears to be related in some way to the SEGV problem.
            Will deal with this in time :)

            Peter


            ---------------------------------------------------------------------
            To unsubscribe, e-mail: asp-unsubscribe@...
            For additional commands, e-mail: asp-help@...
          • Josh Chamas
            ... Yes, this should be fixed in the next release 2.51, which I will be posting shortly to CPAN ( next few days I m sure ). ... I have a possible fix for this,
            Message 5 of 5 , Dec 10, 2002
            • 0 Attachment
              Peter Galbavy wrote:
              >
              > Set-up is OpenBSD/i386 (both 3.2 and -current - Apache/1.3.27), mod_perl
              > 1.27 and Apache::ASP 2.49 with this one patch:
              >
              > --- ASP.pm.orig Fri Nov 22 13:12:02 2002
              > +++ ASP.pm Fri Nov 22 13:12:11 2002
              > @@ -537,7 +537,7 @@ sub FileId {
              > my @inode_stat = ();
              > if($self->{inode_names}) {
              > @inode_stat = stat($file);
              > - unless($inode_stat[0] && $inode_stat[1]) {
              > + unless($inode_stat[0] || $inode_stat[1]) {
              > @inode_stat = ();
              > }
              > }
              >
              >
              > What I am hoping for is any instances of people saying that this stuff
              > sounds familir or that it is fixed in next release :)
              >
              >

              Yes, this should be fixed in the next release 2.51, which I will
              be posting shortly to CPAN ( next few days I'm sure ).

              > The symptoms, indicating maybe one or maybe more problems;
              >
              > 1. I get many many instances of:
              >
              > Use of uninitialized value in split at
              > /usr/local/libdata/perl5/site_perl/Apache
              > /ASP/Response.pm line 938 during global destruction.
              >

              I have a possible fix for this, and I will send you my
              latest 2.51 dev version for you to test separately.

              >
              > 2. Quite a few:
              >
              > Use of uninitialized value in string eq at
              > /usr/local/libdata/perl5/site_perl/Ap
              > ache/ASP/Session.pm line 236 during global destruction.
              >

              I have just fixed this as well, to be sent to you shortly.

              > 3. SEGV:
              >
              > I am getting a number of:
              >
              > [Tue Dec 10 08:50:09 2002] [notice] child pid 161 exit signal Segmentation
              > fault
              > (11)
              >

              Hmmm... don't know what that is.

              > Haven't looked at the core files yet. Will do soon. Not much else to go on.
              >
              > 4. 'Missing' environment
              >
              > Maybe related to the SEGV above, but I am seeing occasional failures in .asp
              > files to see any environment or ASP objects. I have code that does this:
              >
              > <% if (!defined $r->path_info) { %>
              > No category chosen.
              > ...
              > <% } else { %>
              >
              > But the URL most DEFINITELY had PATH_INFO... the access_log entries say
              > so...

              I'm not sure what is happening here, but is worth looking into.

              Thanks for the bug reports.

              --Josh
              ________________________________________________________________
              Josh Chamas, Founder phone:925-552-0128
              Chamas Enterprises Inc. http://www.chamas.com
              NodeWorks Link Checking http://www.nodeworks.com


              ---------------------------------------------------------------------
              To unsubscribe, e-mail: asp-unsubscribe@...
              For additional commands, e-mail: asp-help@...
            Your message has been successfully submitted and would be delivered to recipients shortly.