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

Re: Help needed with mod_perl-1.99_13 and loading some AWStats modules

Expand Messages
  • Perrin Harkins
    ... Actually, mod_perl is not doing anything special here. Perl normally keeps things in memory after you ve compiled them, for as long as the interpreter is
    Message 1 of 4 , May 17, 2004
      Tom Williams wrote:
      > " If sometimes flags are here, problem is in loading the domains.pm
      > (making country array not loaded correctly) file.
      > Because yo use mod_perl and i known this module has a very special way
      > to load pm files and to initialize perl variables (variables are kept in
      > memory between sessions and not reloaded at each load of awstats page),
      > i think problem comes from mod_perl.
      > The DomainsHashIDLib array seems to be not always loaded by mod_perl but
      > i don't know how to solve this."

      Actually, mod_perl is not doing anything special here. Perl normally
      keeps things in memory after you've compiled them, for as long as the
      interpreter is alive. You don't typically see the consequences of this
      because with a CGI script the perl interpreter exits right away, taking
      everything it had in memory with it.

      The problem with domains.pm is that it doesn't follow the rules for
      Perl5 modules: it has no package declaration. This causes you to hit
      the problem documented here:
      http://perl.apache.org/docs/1.0/guide/porting.html#Name_collisions_with_Modules_and_libs

      You may be able to make it work by running it under Apache::PerlRun,
      which is slower, but tries harder to support legacy code with namespace
      problems.

      - Perrin

      --
      Report problems: http://perl.apache.org/bugs/
      Mail list info: http://perl.apache.org/maillist/modperl.html
      List etiquette: http://perl.apache.org/maillist/email-etiquette.html
    • Tom Williams
      ... Cool! I do notice that from time to time the multi-threaded child processes will die off and new ones spawn and I understand this is normal for the Apache
      Message 2 of 4 , May 17, 2004
        Perrin Harkins wrote:

        > Tom Williams wrote:
        >
        >> " If sometimes flags are here, problem is in loading the domains.pm
        >> (making country array not loaded correctly) file.
        >> Because yo use mod_perl and i known this module has a very special
        >> way to load pm files and to initialize perl variables (variables are
        >> kept in memory between sessions and not reloaded at each load of
        >> awstats page), i think problem comes from mod_perl.
        >> The DomainsHashIDLib array seems to be not always loaded by mod_perl
        >> but i don't know how to solve this."
        >
        >
        > Actually, mod_perl is not doing anything special here. Perl normally
        > keeps things in memory after you've compiled them, for as long as the
        > interpreter is alive. You don't typically see the consequences of
        > this because with a CGI script the perl interpreter exits right away,
        > taking everything it had in memory with it.

        Cool! I do notice that from time to time the multi-threaded child
        processes will die off and new ones spawn and I understand this is
        normal for the Apache 2.0 work MPM. So, each time a child process
        terminates the Perl interpreter for that process goes with it and the
        new child gets a new interpreter, correct?

        > The problem with domains.pm is that it doesn't follow the rules for
        > Perl5 modules: it has no package declaration. This causes you to hit
        > the problem documented here:
        > http://perl.apache.org/docs/1.0/guide/porting.html#Name_collisions_with_Modules_and_libs
        >

        Ok, I'll look into this.

        > You may be able to make it work by running it under Apache::PerlRun,
        > which is slower, but tries harder to support legacy code with
        > namespace problems.

        Great! Thanks!

        Peace...

        Tom

        --
        Report problems: http://perl.apache.org/bugs/
        Mail list info: http://perl.apache.org/maillist/modperl.html
        List etiquette: http://perl.apache.org/maillist/email-etiquette.html
      • Perrin Harkins
        ... Well, with the worker MPM it s threads, not processes, but essesntially the same otherwise. Also, I should have mentioned that under mp2 the module is
        Message 3 of 4 , May 18, 2004
          Tom Williams wrote:
          > I do notice that from time to time the multi-threaded child
          > processes will die off and new ones spawn and I understand this is
          > normal for the Apache 2.0 work MPM. So, each time a child process
          > terminates the Perl interpreter for that process goes with it and the
          > new child gets a new interpreter, correct?

          Well, with the worker MPM it's threads, not processes, but essesntially
          the same otherwise.

          Also, I should have mentioned that under mp2 the module is called
          ModPerl::PerlRun, not Apache::PerlRun.

          - Perrin

          --
          Report problems: http://perl.apache.org/bugs/
          Mail list info: http://perl.apache.org/maillist/modperl.html
          List etiquette: http://perl.apache.org/maillist/email-etiquette.html
        Your message has been successfully submitted and would be delivered to recipients shortly.