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

upgrading from v1.95

Expand Messages
  • Remi Fasol
    hello, i m a moving my site to a new machine and decided to upgrade from version 1.95 to the current version. i enable cookieless sessions via SessionQuery but
    Message 1 of 7 , Aug 4, 2003
      hello,

      i'm a moving my site to a new machine and decided to
      upgrade from version 1.95 to the current version.

      i enable cookieless sessions via SessionQuery but
      would like to turn this feature off when my local site
      indexing system runs (otherwise it takes way too long
      to index the site). i fixed this problem in the older
      version with a simple modification to "sub URL" in
      ASP.pm like this:

      if($asp->{session_url} && $asp->{session_id} && !
      $asp->{session_cookie}
      && $ENV{HTTP_USER_AGENT} =~ /^Mozilla/) {

      however, now this "fix" no longer works and the
      session id is still being appended to the url (also i
      notice the sub is now located in Server.pm).

      does anyone have an idea how to produce my desired
      result in the current version of Apache ASP? i looked
      through the various components of the new version and
      am stumped. :(

      thanks in advance,
      remi

      __________________________________
      Do you Yahoo!?
      Yahoo! SiteBuilder - Free, easy-to-use web site design software
      http://sitebuilder.yahoo.com

      ---------------------------------------------------------------------
      To unsubscribe, e-mail: asp-unsubscribe@...
      For additional commands, e-mail: asp-help@...
    • Joshua Chamas
      ... How about using a mod_perl style PerlInitHandler to unset ( or set to Off ), the SessionQuery configs if the user agent matches your specified user agents.
      Message 2 of 7 , Aug 4, 2003
        Quoting Remi Fasol <re_mi_fa@...>:

        > hello,
        >
        > i'm a moving my site to a new machine and decided to
        > upgrade from version 1.95 to the current version.
        >
        > i enable cookieless sessions via SessionQuery but
        > would like to turn this feature off when my local site
        > indexing system runs (otherwise it takes way too long
        > to index the site). i fixed this problem in the older
        > version with a simple modification to "sub URL" in
        > ASP.pm like this:

        How about using a mod_perl style PerlInitHandler to
        unset ( or set to Off ), the SessionQuery configs if the
        user agent matches your specified user agents. This method
        is documented here...

        http://www.apache-asp.org/faq.html#How%20can%20I%20kef206b910

        but the focus of that solution to disabling session in case
        of bots hitting your site.

        Regards,

        Josh

        ---------------------------------------------------------------------
        To unsubscribe, e-mail: asp-unsubscribe@...
        For additional commands, e-mail: asp-help@...
      • greg@mail.netio.org
        ... I ve read this FAQ item a couple of times and would like more details and/or example(s) to go with it. Nothing fancy, just a simple one bot example of
        Message 3 of 7 , Aug 4, 2003
          On Mon, 4 Aug 2003, Joshua Chamas wrote:

          > Quoting Remi Fasol <re_mi_fa@...>:
          >
          > > i enable cookieless sessions via SessionQuery but
          > > would like to turn this feature off when my local site
          > > indexing system runs (otherwise it takes way too long
          > > to index the site). i fixed this problem in the older
          > > version with a simple modification to "sub URL" in
          > > ASP.pm like this:
          >
          > How about using a mod_perl style PerlInitHandler to
          > unset ( or set to Off ), the SessionQuery configs if the
          > user agent matches your specified user agents. This method
          > is documented here...
          >
          > http://www.apache-asp.org/faq.html#How%20can%20I%20kef206b910
          >
          > but the focus of that solution to disabling session in case
          > of bots hitting your site.

          I've read this FAQ item a couple of times and would like more details
          and/or example(s) to go with it. Nothing fancy, just a simple one bot
          example of actually using this.

          Does anyone who actually uses this care to share their implementation?

          Thanks,
          Greg


          ---------------------------------------------------------------------
          To unsubscribe, e-mail: asp-unsubscribe@...
          For additional commands, e-mail: asp-help@...
        • Josh Chamas
          ... Typically, this code would go into a startup.pl type mod_perl file like so: # httpd.conf PerlRequire /path/to/startup.pl PerlInitHandler My::InitHandler #
          Message 4 of 7 , Aug 6, 2003
            Remi Fasol wrote:
            > hello josh.
            >
            > i'm not sure how to do this. would it look something
            > like:
            >
            > PerlInitHandler "sub {
            > $_[0]->dir_config('SessionQuery', 0) unless
            > $ENV{HTTP_USER_AGENT} =~ /^Mozilla/ }"
            >
            > if so, under what section of my config files would i
            > put this handler?
            >

            Typically, this code would go into a startup.pl type mod_perl file like so:

            # httpd.conf
            PerlRequire /path/to/startup.pl
            PerlInitHandler My::InitHandler

            # startup.pl
            package My::InitHandler;
            use Apache;

            sub handler {
            my $r = shift;

            unless($r->headers_in('User-Agent') =~ /^Mozilla/)) {
            $r->dir_config('SessionQuery', 'Off');
            # you might also set other SessionQuery* params to Off here too...
            }

            200;
            }

            1;

            If you wanted to skip the startup.pl file, you could move this code directly
            to your httpd.conf file in <Perl> sections, or you could nicely package this
            handler as a real perl module which you PerlModule from httpd.conf.

            Regards,

            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@...
          • Remi Fasol
            hello. i entered this code almost exactly as written, and for some reason, SessionQuery is not being turned off for non-Mozilla user agents. is there anything
            Message 5 of 7 , Aug 11, 2003
              hello.

              i entered this code almost exactly as written, and for
              some reason, SessionQuery is not being turned off for
              non-Mozilla user agents.

              is there anything else i can try (or perhaps a
              suggested technique for tracking down why this
              happens)?

              thanks,
              remi

              --- Josh Chamas <josh@...> wrote:


              > # httpd.conf
              > PerlRequire /path/to/startup.pl
              > PerlInitHandler My::InitHandler
              >
              > # startup.pl
              > package My::InitHandler;
              > use Apache;
              >
              > sub handler {
              > my $r = shift;
              >
              > unless($r->header_in('User-Agent') =~
              > /^Mozilla/)) {
              > $r->dir_config('SessionQuery', 'Off');
              > # you might also set other SessionQuery*
              > params to Off here too...
              > }
              >
              > 200;
              > }
              >
              > 1;
              >
              > If you wanted to skip the startup.pl file, you could
              > move this code directly
              > to your httpd.conf file in <Perl> sections, or you
              > could nicely package this
              > handler as a real perl module which you PerlModule
              > from httpd.conf.
              >

              __________________________________
              Do you Yahoo!?
              Yahoo! SiteBuilder - Free, easy-to-use web site design software
              http://sitebuilder.yahoo.com

              ---------------------------------------------------------------------
              To unsubscribe, e-mail: asp-unsubscribe@...
              For additional commands, e-mail: asp-help@...
            • Ben Soares
              Hi Remi, When you say for non-Mozilla User-Agents , do you mean browsers that aren t the Mozilla browser? If so that might be because plenty of other
              Message 6 of 7 , Aug 12, 2003
                Hi Remi,

                When you say "for non-Mozilla User-Agents", do you mean browsers that
                aren't the Mozilla browser? If so that might be because plenty of
                other browsers' User-Agent strings also start with "Mozilla...", e.g.
                An up to date Internet Explorer (on Win Me) sends this header:

                User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90)

                There's an excellent (and loong) list of user-agent strings categorised
                by browser name and version at

                <http://www.pgts.com.au/pgtsj/pgtsj0212d.html>

                in an HTML table or as a tab-separated ASCII file (very useful).

                You might want to make your regexp match on something more specific
                (though judging from the list at the above url it's not clear in the
                general case what that might be!). You mention in your original email
                that this is only for your site indexer -- can you make that issue your
                own made-up User-Agent string to look for? or alternatively find out
                its exact User-Agent string and match on something not far off that.

                Apologies if I've misinterpreted the problem, or you've already tried
                the above suggestions.

                Ben


                On Tuesday, 12 August, 2003 05:24, Remi Fasol wrote:
                > hello.
                >
                > i entered this code almost exactly as written, and for
                > some reason, SessionQuery is not being turned off for
                > non-Mozilla user agents.
                >
                > is there anything else i can try (or perhaps a
                > suggested technique for tracking down why this
                > happens)?
                >
                > thanks,
                > remi
                >
                > --- Josh Chamas <josh@...> wrote:
                > > # httpd.conf
                > > PerlRequire /path/to/startup.pl
                > > PerlInitHandler My::InitHandler
                > >
                > > # startup.pl
                > > package My::InitHandler;
                > > use Apache;
                > >
                > > sub handler {
                > > my $r = shift;
                > >
                > > unless($r->header_in('User-Agent') =~
                > > /^Mozilla/)) {
                > > $r->dir_config('SessionQuery', 'Off');
                > > # you might also set other SessionQuery*
                > > params to Off here too...
                > > }
                > >
                > > 200;
                > > }
                > >
                > > 1;
                > >
                > > If you wanted to skip the startup.pl file, you could
                > > move this code directly
                > > to your httpd.conf file in <Perl> sections, or you
                > > could nicely package this
                > > handler as a real perl module which you PerlModule
                > > from httpd.conf.
                >
                > __________________________________
                > Do you Yahoo!?
                > Yahoo! SiteBuilder - Free, easy-to-use web site design software
                > http://sitebuilder.yahoo.com
                >
                > ---------------------------------------------------------------------
                > To unsubscribe, e-mail: asp-unsubscribe@...
                > For additional commands, e-mail: asp-help@...

                --
                Ben Soares tel: +44 (0)131-651 1238
                EDINA, Edinburgh University Data Library fax: +44 (0)131-650 3308
                Main Library Building, George Square email: ben.soares@...
                Edinburgh EH8 9LJ, Scotland, UK www: http://edina.ac.uk/

                "Hmmm, that makes no sense to me...
                But then you are very small, perhaps you're right." -- Treebeard



                ---------------------------------------------------------------------
                To unsubscribe, e-mail: asp-unsubscribe@...
                For additional commands, e-mail: asp-help@...
              • Josh Chamas
                ... Could you send the code you are using for your PerlInitHandler, also set Debug -1, stop/start apache and send a trace from error_log for the request of the
                Message 7 of 7 , Aug 12, 2003
                  Remi Fasol wrote:
                  > hello.
                  >
                  > i entered this code almost exactly as written, and for
                  > some reason, SessionQuery is not being turned off for
                  > non-Mozilla user agents.
                  >
                  > is there anything else i can try (or perhaps a
                  > suggested technique for tracking down why this
                  > happens)?
                  >

                  Could you send the code you are using for your PerlInitHandler,
                  also set Debug -1, stop/start apache and send a trace from error_log
                  for the request of the non-Mozilla user agent, that would be great.

                  Regards,

                  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.