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

mod_perl and Apache::Registry

Expand Messages
  • Patricio Muñoz
    Hi, I work with mod_perl for Apache, but I have problem with Apache:Registry. The output error.log is [Thu Nov 27 12:26:16 2003] [error] failed to resolve
    Message 1 of 17 , Nov 27, 2003
    • 0 Attachment
      Hi,
      I work with mod_perl for Apache, but I have problem with Apache:Registry.
      The output error.log is

      [Thu Nov 27 12:26:16 2003] [error] failed to resolve handler
      `Apache::Registry'
      [Thu Nov 27 12:26:16 2003] [error] [client 192.168.0.5] Can't locate
      Apache/Registry.pm in @INC (@INC contains: D:/Perl/lib D:/Perl/site/lib .
      D:/Apache/Apache2/ D:/Apache/Apache2/lib/perl) at (eval 1) line 3.

      In httpd.conf

      LoadModule perl_module modules/mod_perl.so

      ......

      Alias /perl/ "D:/Apache/Apache2/perl/"

      <Location /perl>
      SetHandler perl-script
      PerlHandler Apache::Registry
      PerlSendHeader On
      Options +ExecCGI
      </Location>


      Version:
      Apache/2.0.48 (Win32) mod_perl/1.99_12-dev Perl/v5.8.1

      Regards


      --
      Reporting bugs: http://perl.apache.org/bugs/
      Mail list info: http://perl.apache.org/maillist/modperl.html
    • Jay R. Ashworth
      ... That was the kicker. I believe the handler has changed it s name to ModPerl::Registry in mod_perl 2; at least, that s what I m using, with apparent
      Message 2 of 17 , Nov 27, 2003
      • 0 Attachment
        On Thu, Nov 27, 2003 at 02:43:46PM -0300, Patricio Muñoz wrote:
        > I work with mod_perl for Apache, but I have problem with Apache:Registry.
        > The output error.log is
        >
        > [Thu Nov 27 12:26:16 2003] [error] failed to resolve handler
        > `Apache::Registry'
        > [Thu Nov 27 12:26:16 2003] [error] [client 192.168.0.5] Can't locate
        > Apache/Registry.pm in @INC (@INC contains: D:/Perl/lib D:/Perl/site/lib .
        > D:/Apache/Apache2/ D:/Apache/Apache2/lib/perl) at (eval 1) line 3.
        >
        > In httpd.conf
        >
        > LoadModule perl_module modules/mod_perl.so
        >
        > ......
        >
        > Alias /perl/ "D:/Apache/Apache2/perl/"
        >
        > <Location /perl>
        > SetHandler perl-script
        > PerlHandler Apache::Registry
        > PerlSendHeader On
        > Options +ExecCGI
        > </Location>
        >
        >
        > Version:
        > Apache/2.0.48 (Win32) mod_perl/1.99_12-dev Perl/v5.8.1

        That was the kicker. I believe the handler has changed it's name to
        ModPerl::Registry in mod_perl 2; at least, that's what I'm using, with
        apparent success.

        Cheers,
        -- jra
        --
        Jay R. Ashworth jra@...
        Member of the Technical Staff Baylink RFC 2100
        The Suncoast Freenet The Things I Think
        Tampa Bay, Florida http://baylink.pitas.com +1 727 647 1274

        Come see Linux Gazette in our new home: www.linuxgazette.net!

        --
        Reporting bugs: http://perl.apache.org/bugs/
        Mail list info: http://perl.apache.org/maillist/modperl.html
      • Stas Bekman
        Jay R. Ashworth wrote: [...] ... That s right, Jay. If you are migrating from mp1 to mp2, please take some time to review the following docs. They will save
        Message 3 of 17 , Nov 27, 2003
        • 0 Attachment
          Jay R. Ashworth wrote:
          [...]
          >>Version:
          >>Apache/2.0.48 (Win32) mod_perl/1.99_12-dev Perl/v5.8.1
          >
          >
          > That was the kicker. I believe the handler has changed it's name to
          > ModPerl::Registry in mod_perl 2; at least, that's what I'm using, with
          > apparent success.

          That's right, Jay.

          If you are migrating from mp1 to mp2, please take some time to review the
          following docs. They will save you a lot of frustration and wasted time.
          http://perl.apache.org/docs/2.0/user/porting/compat.html
          http://perl.apache.org/docs/2.0/user/porting/porting.html

          __________________________________________________________________
          Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
          http://stason.org/ mod_perl Guide ---> http://perl.apache.org
          mailto:stas@... http://use.perl.org http://apacheweek.com
          http://modperlbook.org http://apache.org http://ticketmaster.com


          --
          Reporting bugs: http://perl.apache.org/bugs/
          Mail list info: http://perl.apache.org/maillist/modperl.html
        • Patricio Muñoz
          ... I see document http://perl.apache.org/docs/2.0/user/porting/compat.html and Adjust the httpd.conf Alias /perl/ D:/Apache/Apache2/perl
          Message 4 of 17 , Nov 27, 2003
          • 0 Attachment
            > Jay R. Ashworth wrote:
            > [...]
            > >>Version:
            > >>Apache/2.0.48 (Win32) mod_perl/1.99_12-dev Perl/v5.8.1
            > >
            > >
            > > That was the kicker. I believe the handler has changed it's name to
            > > ModPerl::Registry in mod_perl 2; at least, that's what I'm using, with
            > > apparent success.
            >
            > That's right, Jay.
            >
            > If you are migrating from mp1 to mp2, please take some time to review the
            > following docs. They will save you a lot of frustration and wasted time.
            > http://perl.apache.org/docs/2.0/user/porting/compat.html
            > http://perl.apache.org/docs/2.0/user/porting/porting.html

            I see document http://perl.apache.org/docs/2.0/user/porting/compat.html and
            Adjust the httpd.conf

            Alias /perl/ "D:/Apache/Apache2/perl"

            <Location /perl>
            SetHandler perl-script
            PerlResponseHandler ModPerl::Registry
            Options +ExecCGI
            PerlOptions +ParseHeaders
            </Location>

            And restart service apache and logout error.log is

            [Thu Nov 27 16:48:02 2003] [error] failed to resolve handler
            `ModPerl::Registry'
            [Thu Nov 27 16:48:02 2003] [error] [client 192.168.0.5] Can't locate
            Apache/Response.pm in @INC (@INC contains: D:/Perl/lib D:/Perl/site/lib .
            D:/Apache/Apache2/ D:/Apache/Apache2/lib/perl) at
            D:/Perl/site/lib/ModPerl/RegistryCooker.pm line 18.
            BEGIN failed--compilation aborted at
            D:/Perl/site/lib/ModPerl/RegistryCooker.pm line 18.
            Compilation failed in require at (eval 2) line 3.
            ...propagated at D:/Perl/lib/base.pm line 70.
            BEGIN failed--compilation aborted at D:/Perl/site/lib/ModPerl/Registry.pm
            line 11.
            Compilation failed in require at (eval 1) line 3.

            Version:
            Apache/2.0.48 (Win32) mod_perl/1.99_12-dev Perl/v5.8.1

            Regards



            --
            Reporting bugs: http://perl.apache.org/bugs/
            Mail list info: http://perl.apache.org/maillist/modperl.html
          • Randy Kobes
            On Thu, 27 Nov 2003, [iso-8859-1] Patricio Muñoz wrote: [ .. ] ... You need to use the Apache2 module, to adjust @INC to search in an Apache2/ subdirectory
            Message 5 of 17 , Nov 27, 2003
            • 0 Attachment
              On Thu, 27 Nov 2003, [iso-8859-1] Patricio Muñoz wrote:

              [ .. ]
              > I see document
              > http://perl.apache.org/docs/2.0/user/porting/compat.html
              > and Adjust the httpd.conf
              >
              > Alias /perl/ "D:/Apache/Apache2/perl"
              >
              > <Location /perl>
              > SetHandler perl-script
              > PerlResponseHandler ModPerl::Registry
              > Options +ExecCGI
              > PerlOptions +ParseHeaders
              > </Location>
              >
              > And restart service apache and logout error.log is
              >
              > [Thu Nov 27 16:48:02 2003] [error] failed to resolve handler
              > `ModPerl::Registry'
              > [Thu Nov 27 16:48:02 2003] [error] [client 192.168.0.5] Can't locate
              > Apache/Response.pm in @INC (@INC contains: D:/Perl/lib D:/Perl/site/lib .
              > D:/Apache/Apache2/ D:/Apache/Apache2/lib/perl) at
              > D:/Perl/site/lib/ModPerl/RegistryCooker.pm line 18.

              You need to "use" the Apache2 module, to adjust @INC
              to search in an Apache2/ subdirectory of your @INC.
              Either put in a
              PerlModule Apache2
              directive early on in your httpd.conf, or else have
              a startup file conf/startup.pl, invoked by a
              PerlRequire "D:/Apache/Apache2/conf/startup.pl"
              directive in httpd.conf, that includes a line
              use Apache2 ();
              in it.

              --
              best regards,
              randy kobes

              --
              Reporting bugs: http://perl.apache.org/bugs/
              Mail list info: http://perl.apache.org/maillist/modperl.html
            • Stas Bekman
              Patricio Muñoz wrote: [...] ... Search your filesystem, you must have Apache/Response.pm if you have installed mp2. It seems that you have a messed up
              Message 6 of 17 , Nov 27, 2003
              • 0 Attachment
                Patricio Muñoz wrote:
                [...]
                > I see document http://perl.apache.org/docs/2.0/user/porting/compat.html and
                > Adjust the httpd.conf
                >
                > Alias /perl/ "D:/Apache/Apache2/perl"
                >
                > <Location /perl>
                > SetHandler perl-script
                > PerlResponseHandler ModPerl::Registry
                > Options +ExecCGI
                > PerlOptions +ParseHeaders
                > </Location>
                >
                > And restart service apache and logout error.log is
                >
                > [Thu Nov 27 16:48:02 2003] [error] failed to resolve handler
                > `ModPerl::Registry'
                > [Thu Nov 27 16:48:02 2003] [error] [client 192.168.0.5] Can't locate
                > Apache/Response.pm in @INC (@INC contains: D:/Perl/lib D:/Perl/site/lib .
                > D:/Apache/Apache2/ D:/Apache/Apache2/lib/perl) at
                > D:/Perl/site/lib/ModPerl/RegistryCooker.pm line 18.
                > BEGIN failed--compilation aborted at
                > D:/Perl/site/lib/ModPerl/RegistryCooker.pm line 18.
                > Compilation failed in require at (eval 2) line 3.
                > ...propagated at D:/Perl/lib/base.pm line 70.
                > BEGIN failed--compilation aborted at D:/Perl/site/lib/ModPerl/Registry.pm
                > line 11.
                > Compilation failed in require at (eval 1) line 3.

                Search your filesystem, you must have Apache/Response.pm if you have installed
                mp2.

                It seems that you have a messed up installation, as your ModPerl/Registry.pm
                resides under non-Apache2 subdir and you have /Apache/Apache2/lib/perl. Did
                you have some old mod_perl install? Both ModPerl/Registry.pm and
                Apache/Response.pm are supposed to live under the same directory. I hope you
                didn't just go and copy ModPerl/Registry.pm manually, leaving out the rest.

                __________________________________________________________________
                Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
                http://stason.org/ mod_perl Guide ---> http://perl.apache.org
                mailto:stas@... http://use.perl.org http://apacheweek.com
                http://modperlbook.org http://apache.org http://ticketmaster.com


                --
                Reporting bugs: http://perl.apache.org/bugs/
                Mail list info: http://perl.apache.org/maillist/modperl.html
              • Patricio Muñoz
                ... and ... . ... D:/Perl/site/lib/ModPerl/Registry.pm ... installed ... ModPerl/Registry.pm ... Did ... Yes, but uninstall with ppm utility ... the same
                Message 7 of 17 , Nov 27, 2003
                • 0 Attachment
                  > Patricio Muñoz wrote:
                  > [...]
                  > > I see document http://perl.apache.org/docs/2.0/user/porting/compat.html
                  and
                  > > Adjust the httpd.conf
                  > >
                  > > Alias /perl/ "D:/Apache/Apache2/perl"
                  > >
                  > > <Location /perl>
                  > > SetHandler perl-script
                  > > PerlResponseHandler ModPerl::Registry
                  > > Options +ExecCGI
                  > > PerlOptions +ParseHeaders
                  > > </Location>
                  > >
                  > > And restart service apache and logout error.log is
                  > >
                  > > [Thu Nov 27 16:48:02 2003] [error] failed to resolve handler
                  > > `ModPerl::Registry'
                  > > [Thu Nov 27 16:48:02 2003] [error] [client 192.168.0.5] Can't locate
                  > > Apache/Response.pm in @INC (@INC contains: D:/Perl/lib D:/Perl/site/lib
                  .
                  > > D:/Apache/Apache2/ D:/Apache/Apache2/lib/perl) at
                  > > D:/Perl/site/lib/ModPerl/RegistryCooker.pm line 18.
                  > > BEGIN failed--compilation aborted at
                  > > D:/Perl/site/lib/ModPerl/RegistryCooker.pm line 18.
                  > > Compilation failed in require at (eval 2) line 3.
                  > > ...propagated at D:/Perl/lib/base.pm line 70.
                  > > BEGIN failed--compilation aborted at
                  D:/Perl/site/lib/ModPerl/Registry.pm
                  > > line 11.
                  > > Compilation failed in require at (eval 1) line 3.
                  >
                  > Search your filesystem, you must have Apache/Response.pm if you have
                  installed
                  > mp2.
                  >
                  > It seems that you have a messed up installation, as your
                  ModPerl/Registry.pm
                  > resides under non-Apache2 subdir and you have /Apache/Apache2/lib/perl.
                  Did
                  > you have some old mod_perl install?

                  Yes, but uninstall with ppm utility

                  > Both ModPerl/Registry.pm and Apache/Response.pm are supposed to live under
                  the same directory. I hope you
                  > didn't just go and copy ModPerl/Registry.pm manually, leaving out the
                  rest.

                  The Registry.pm this in folder D:\Perl\site\lib\ModPerl
                  The Response.pm in D:\Perl\site\lib\Apache2\Apache

                  Copy ModPerl/Registry.pm manually where ? and Response.pm ?

                  The @INC contains: D:/Perl/lib D:/Perl/site/lib . D:/Apache/Apache2/
                  D:/Apache/Apache2/lib/perl) at D:/Perl/site/lib/ModPerl/RegistryCooker.pm

                  regards





                  --
                  Reporting bugs: http://perl.apache.org/bugs/
                  Mail list info: http://perl.apache.org/maillist/modperl.html
                • Randy Kobes
                  On Thu, 27 Nov 2003, Stas Bekman wrote: [ .. ] ... Actually, ModPerl::Registry appearing as a lib/ModPerl/Registry.pm and Apache::Response appearing as a
                  Message 8 of 17 , Nov 27, 2003
                  • 0 Attachment
                    On Thu, 27 Nov 2003, Stas Bekman wrote:

                    [ .. ]
                    > Search your filesystem, you must have Apache/Response.pm
                    > if you have installed mp2.
                    >
                    > It seems that you have a messed up installation, as your
                    > ModPerl/Registry.pm resides under non-Apache2 subdir and
                    > you have /Apache/Apache2/lib/perl. Did you have some old
                    > mod_perl install? Both ModPerl/Registry.pm and
                    > Apache/Response.pm are supposed to live under the same
                    > directory. I hope you didn't just go and copy
                    > ModPerl/Registry.pm manually, leaving out the rest.

                    Actually, ModPerl::Registry appearing as a
                    lib/ModPerl/Registry.pm and Apache::Response appearing as a
                    lib/Apache2/Apache/Response.pm does happen with Win32,
                    which is different than Unix, where both appear
                    under a lib/Apache2/. That's why, if you miss loading
                    the Apache2.pm module, ModPerl::Registry is found,
                    but not Apache::Response.

                    --
                    best regards,
                    randy

                    --
                    Reporting bugs: http://perl.apache.org/bugs/
                    Mail list info: http://perl.apache.org/maillist/modperl.html
                  • Stas Bekman
                    ... So is that a MakeMaker thing. It s a definite a bug and it needs to be fixed. Though I d check blib/ first. If the two don t reside under the same
                    Message 9 of 17 , Nov 27, 2003
                    • 0 Attachment
                      Randy Kobes wrote:
                      > On Thu, 27 Nov 2003, Stas Bekman wrote:
                      >
                      > [ .. ]
                      >
                      >>Search your filesystem, you must have Apache/Response.pm
                      >>if you have installed mp2.
                      >>
                      >>It seems that you have a messed up installation, as your
                      >>ModPerl/Registry.pm resides under non-Apache2 subdir and
                      >>you have /Apache/Apache2/lib/perl. Did you have some old
                      >>mod_perl install? Both ModPerl/Registry.pm and
                      >>Apache/Response.pm are supposed to live under the same
                      >>directory. I hope you didn't just go and copy
                      >>ModPerl/Registry.pm manually, leaving out the rest.
                      >
                      >
                      > Actually, ModPerl::Registry appearing as a
                      > lib/ModPerl/Registry.pm and Apache::Response appearing as a
                      > lib/Apache2/Apache/Response.pm does happen with Win32,
                      > which is different than Unix, where both appear
                      > under a lib/Apache2/.

                      So is that a MakeMaker thing. It's a definite a bug and it needs to be fixed.

                      Though I'd check blib/ first. If the two don't reside under the same directory
                      it may as well be a bug in ModPerl::BuildMM which arranges for 2.0 modules to
                      be under Apache2/ subdir.

                      > That's why, if you miss loading
                      > the Apache2.pm module, ModPerl::Registry is found,
                      > but not Apache::Response.

                      It's just that Patricio's report had:

                      (@INC contains: D:/Perl/lib D:/Perl/site/lib .
                      D:/Apache/Apache2/ D:/Apache/Apache2/lib/perl)

                      with Apache2 in it, so for a moment I thought that he had Apache2 included.
                      Does the ppm that you maintain include startup.pl or some other file, where we
                      could include 'use Apache2;' on behalf of users? I guess they will still have
                      to include it from httpd.conf, unless you supply the latter and we should just
                      put it there then.

                      __________________________________________________________________
                      Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
                      http://stason.org/ mod_perl Guide ---> http://perl.apache.org
                      mailto:stas@... http://use.perl.org http://apacheweek.com
                      http://modperlbook.org http://apache.org http://ticketmaster.com


                      --
                      Reporting bugs: http://perl.apache.org/bugs/
                      Mail list info: http://perl.apache.org/maillist/modperl.html
                    • Randy Kobes
                      ... [ ... ] ... I think it is a ModPerl::BuildMM thing - this patch ======================================================== Index: lib/ModPerl/BuildMM.pm
                      Message 10 of 17 , Nov 27, 2003
                      • 0 Attachment
                        On Thu, 27 Nov 2003, Stas Bekman wrote:

                        > Randy Kobes wrote:
                        [ ... ]
                        > > Actually, ModPerl::Registry appearing as a
                        > > lib/ModPerl/Registry.pm and Apache::Response appearing as a
                        > > lib/Apache2/Apache/Response.pm does happen with Win32,
                        > > which is different than Unix, where both appear
                        > > under a lib/Apache2/.
                        >
                        > So is that a MakeMaker thing. It's a definite a bug and it needs to be fixed.
                        >
                        > Though I'd check blib/ first. If the two don't reside
                        > under the same directory it may as well be a bug in
                        > ModPerl::BuildMM which arranges for 2.0 modules to be
                        > under Apache2/ subdir.

                        I think it is a ModPerl::BuildMM thing - this patch
                        ========================================================
                        Index: lib/ModPerl/BuildMM.pm
                        ===================================================================
                        RCS file: /home/cvs/modperl-2.0/lib/ModPerl/BuildMM.pm,v
                        retrieving revision 1.12
                        diff -u -r1.12 BuildMM.pm
                        --- lib/ModPerl/BuildMM.pm 11 Sep 2003 01:31:22 -0000 1.12
                        +++ lib/ModPerl/BuildMM.pm 28 Nov 2003 04:24:26 -0000
                        @@ -235,7 +235,7 @@
                        #unless already specified with \$(INST_LIB)
                        #or already in Apache2/
                        unless ($v =~ /Apache2/) {
                        - $v =~ s|(blib/lib)|$1/Apache2|;
                        + $v =~ s{(blib)(/|\\)(lib)}{$1$2$3$2Apache2};
                        }

                        $pm->{$k} = $v;
                        ==================================================================
                        arranges for everything to be put under an Apache2/.

                        One consideration about this - if someone has a Win32 build
                        under the current system (where some files are under an
                        Apache2/, and others aren't), and then installs a build with
                        a patch like above applied where everything gets put under
                        an Apache2/, there'll be duplicates of some files. I think
                        using Apache2.pm will pick up the newer files installed
                        under an Apache2/, in preference to the older ones which
                        weren't, as @INC will have D:/Perl/site/lib/Apache2 before
                        D:/Perl/site/lib, so that should be OK. However, perhaps we
                        should think about unlinking the old files not under an
                        Apache2/?

                        > > That's why, if you miss loading
                        > > the Apache2.pm module, ModPerl::Registry is found,
                        > > but not Apache::Response.
                        >
                        > It's just that Patricio's report had:
                        >
                        > (@INC contains: D:/Perl/lib D:/Perl/site/lib .
                        > D:/Apache/Apache2/ D:/Apache/Apache2/lib/perl)
                        >
                        > with Apache2 in it, so for a moment I thought that he had
                        > Apache2 included.

                        I had interpreted that to mean Apache was installed under
                        D:\Apache\Apache2\ (the Win32 installer isn't clear when
                        installing Apache that it will be unpacked into its own
                        directory).

                        > Does the ppm that you maintain include startup.pl or some
                        > other file, where we could include 'use Apache2;' on
                        > behalf of users? I guess they will still have to include
                        > it from httpd.conf, unless you supply the latter and we
                        > should just put it there then.

                        No, it doesn't include a startup.pl - I had thought about
                        that, but was worried about messing with potentially
                        already-present files. What I could do though is, in the
                        post-install script that installs mod_perl.so, have a
                        warning printed out, like you get when building mod_perl, to
                        use Apache2 somewhere.

                        --
                        best regards,
                        randy

                        --
                        Reporting bugs: http://perl.apache.org/bugs/
                        Mail list info: http://perl.apache.org/maillist/modperl.html
                      • Stas Bekman
                        Randy Kobes wrote: [...] ... Cool. Though, it s probably easier to read: $v =~ s{(blib([/ ])lib)}{$1$2Apache2}; or even: $v =~ s{ (blib[/ ]lib) }{ catdir
                        Message 11 of 17 , Nov 27, 2003
                        • 0 Attachment
                          Randy Kobes wrote:
                          [...]
                          > I think it is a ModPerl::BuildMM thing - this patch
                          > ========================================================
                          > Index: lib/ModPerl/BuildMM.pm
                          > ===================================================================
                          > RCS file: /home/cvs/modperl-2.0/lib/ModPerl/BuildMM.pm,v
                          > retrieving revision 1.12
                          > diff -u -r1.12 BuildMM.pm
                          > --- lib/ModPerl/BuildMM.pm 11 Sep 2003 01:31:22 -0000 1.12
                          > +++ lib/ModPerl/BuildMM.pm 28 Nov 2003 04:24:26 -0000
                          > @@ -235,7 +235,7 @@
                          > #unless already specified with \$(INST_LIB)
                          > #or already in Apache2/
                          > unless ($v =~ /Apache2/) {
                          > - $v =~ s|(blib/lib)|$1/Apache2|;
                          > + $v =~ s{(blib)(/|\\)(lib)}{$1$2$3$2Apache2};
                          > }
                          >
                          > $pm->{$k} = $v;
                          > ==================================================================
                          > arranges for everything to be put under an Apache2/.

                          Cool. Though, it's probably easier to read:

                          $v =~ s{(blib([/\\])lib)}{$1$2Apache2};

                          or even:

                          $v =~ s{ (blib[/\\]lib) }{ catdir $1, 'Apache2'}xe;

                          I thought there is at least one more variation of the dir separator, wasn't it
                          ':'?

                          > One consideration about this - if someone has a Win32 build
                          > under the current system (where some files are under an
                          > Apache2/, and others aren't), and then installs a build with
                          > a patch like above applied where everything gets put under
                          > an Apache2/, there'll be duplicates of some files. I think
                          > using Apache2.pm will pick up the newer files installed
                          > under an Apache2/, in preference to the older ones which
                          > weren't, as @INC will have D:/Perl/site/lib/Apache2 before
                          > D:/Perl/site/lib, so that should be OK. However, perhaps we
                          > should think about unlinking the old files not under an
                          > Apache2/?

                          Sure, we can arrange that, via the .packlist, like we do for Apache::test in
                          Apache::Test. Though it's dangerous. Consider the following scenario.

                          1) Install a fresh perl
                          2) Install mp2 w/o Apache2
                          3) Install mp1 which now overwrites some of the mp2 files
                          4) Install mp2 w/ Apache2 and uninstall files not under Apache2

                          results - you will ruin the mp1 install from (3).

                          In the test suite we make sure that we load files from Apache2/ first. Users
                          can do the same, in which case there is no problem. There is no problem if
                          someone installs into Apache2/ and then decides to install into the main @INC.
                          When this happens Apache2.pm will be rewritten not to prepend Apache2 dirs
                          into @INC.

                          So may be let's just keep it there.

                          On a related note we don't handle mp2 man pages properly and they will
                          overwrite mp1 ones if the names are the same. Moreover, since the glueing of
                          the pods to .pms happens quite late, MM doesn't even generate man pages for
                          those files. We probably will need to add a new rule to make the manpages
                          after glueing the pods. But this can wait, unless someone wants to tackle that
                          now.

                          >>Does the ppm that you maintain include startup.pl or some
                          >>other file, where we could include 'use Apache2;' on
                          >>behalf of users? I guess they will still have to include
                          >>it from httpd.conf, unless you supply the latter and we
                          >>should just put it there then.
                          >
                          >
                          > No, it doesn't include a startup.pl - I had thought about
                          > that, but was worried about messing with potentially
                          > already-present files. What I could do though is, in the
                          > post-install script that installs mod_perl.so, have a
                          > warning printed out, like you get when building mod_perl, to
                          > use Apache2 somewhere.

                          Though we can include startup-sample.pl or something like that, which can load
                          Apache2, and may be a few basic modules, like in the docs. On a second thought
                          it's probably better not to do anything behind the scenes, users are better
                          off figuring out that they need to load Apache2 and learning on the way why
                          they need to do that. Otherwise things will work, but users won't understand
                          how mp2 .pms co-exist with mp1 .pms with the same names.

                          __________________________________________________________________
                          Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
                          http://stason.org/ mod_perl Guide ---> http://perl.apache.org
                          mailto:stas@... http://use.perl.org http://apacheweek.com
                          http://modperlbook.org http://apache.org http://ticketmaster.com


                          --
                          Reporting bugs: http://perl.apache.org/bugs/
                          Mail list info: http://perl.apache.org/maillist/modperl.html
                        • Swen Schillig
                          ... wasn t it ... Yeah, I guess for MACs ! Mit freundlichen Grüßen / Best Regards Swen Schillig -- Reporting bugs: http://perl.apache.org/bugs/ Mail list
                          Message 12 of 17 , Nov 27, 2003
                          • 0 Attachment
                            >or even:
                            >
                            > $v =~ s{ (blib[/\\]lib) }{ catdir $1, 'Apache2'}xe;
                            >
                            >I thought there is at least one more variation of the dir separator,
                            wasn't it
                            >':'?

                            Yeah, I guess for MACs !


                            Mit freundlichen Grüßen / Best Regards
                            Swen Schillig



                            --
                            Reporting bugs: http://perl.apache.org/bugs/
                            Mail list info: http://perl.apache.org/maillist/modperl.html
                          • Patricio Muñoz
                            ... ^^^^^ Windows 98 se ... -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
                            Message 13 of 17 , Nov 28, 2003
                            • 0 Attachment
                              > Hi,
                              > I work with mod_perl for Apache, but I have problem with Apache:Registry.
                              > The output error.log is
                              >
                              > [Thu Nov 27 12:26:16 2003] [error] failed to resolve handler
                              > `Apache::Registry'
                              > [Thu Nov 27 12:26:16 2003] [error] [client 192.168.0.5] Can't locate
                              > Apache/Registry.pm in @INC (@INC contains: D:/Perl/lib D:/Perl/site/lib .
                              > D:/Apache/Apache2/ D:/Apache/Apache2/lib/perl) at (eval 1) line 3.
                              >
                              > In httpd.conf
                              >
                              > LoadModule perl_module modules/mod_perl.so
                              >
                              > ......
                              >
                              > Alias /perl/ "D:/Apache/Apache2/perl/"
                              >
                              > <Location /perl>
                              > SetHandler perl-script
                              > PerlHandler Apache::Registry
                              > PerlSendHeader On
                              > Options +ExecCGI
                              > </Location>
                              >
                              >
                              > Version:
                              > Apache/2.0.48 (Win32) mod_perl/1.99_12-dev Perl/v5.8.1
                              ^^^^^
                              Windows 98 se

                              > Regards
                              >


                              --
                              Reporting bugs: http://perl.apache.org/bugs/
                              Mail list info: http://perl.apache.org/maillist/modperl.html
                            • Randy Kobes
                              ... [ .. ] ... Good point - how about =========================================================== Index: lib/ModPerl/BuildMM.pm
                              Message 14 of 17 , Nov 29, 2003
                              • 0 Attachment
                                On Thu, 27 Nov 2003, Stas Bekman wrote:

                                > Randy Kobes wrote:
                                > [...]
                                > > I think it is a ModPerl::BuildMM thing - this patch
                                [ .. ]
                                > > arranges for everything to be put under an Apache2/.
                                >
                                > Cool. Though, it's probably easier to read:
                                >
                                > $v =~ s{(blib([/\\])lib)}{$1$2Apache2};
                                >
                                > or even:
                                >
                                > $v =~ s{ (blib[/\\]lib) }{ catdir $1, 'Apache2'}xe;
                                >
                                > I thought there is at least one more variation of the dir
                                > separator, wasn't it ':'?

                                Good point - how about
                                ===========================================================
                                Index: lib/ModPerl/BuildMM.pm
                                ===================================================================
                                RCS file: /home/cvs/modperl-2.0/lib/ModPerl/BuildMM.pm,v
                                retrieving revision 1.12
                                diff -u -r1.12 BuildMM.pm
                                --- lib/ModPerl/BuildMM.pm 11 Sep 2003 01:31:22 -0000 1.12
                                +++ lib/ModPerl/BuildMM.pm 29 Nov 2003 12:54:59 -0000
                                @@ -5,7 +5,7 @@

                                use ExtUtils::MakeMaker ();
                                use Cwd ();
                                -use File::Spec;
                                +use File::Spec::Functions qw(catdir catfile splitdir);
                                use File::Basename;

                                use Apache::Build ();
                                @@ -20,7 +20,7 @@
                                ModPerl::MM::override_eu_mm_mv_all_methods(@methods);
                                use strict 'refs';

                                -my $apache_test_dir = File::Spec->catdir(Cwd::getcwd(), "Apache-Test", "lib");
                                +my $apache_test_dir = catdir(Cwd::getcwd(), "Apache-Test", "lib");

                                #to override MakeMaker MOD_INSTALL macro
                                sub mod_install {
                                @@ -144,7 +144,7 @@
                                sub ModPerl::BuildMM::MY::postamble {
                                my $self = shift;

                                - my $doc_root = File::Spec->catdir(Cwd::getcwd(), "docs", "api");
                                + my $doc_root = catdir(Cwd::getcwd(), "docs", "api");

                                my @targets = ();

                                @@ -153,10 +153,10 @@

                                if (-d $doc_root) {
                                while (my ($pm, $blib) = each %{$self->{PM}}) {
                                - my $pod = File::Spec->catdir(
                                - (File::Spec->splitdir($blib))[-2 .. -1]);
                                + my $pod = catdir(
                                + (splitdir($blib))[-2 .. -1]);
                                $pod =~ s/\.pm/\.pod/;
                                - my $podpath = File::Spec->catfile($doc_root, $pod);
                                + my $podpath = catfile($doc_root, $pod);
                                next unless -r $podpath;

                                push @target,
                                @@ -235,7 +235,7 @@
                                #unless already specified with \$(INST_LIB)
                                #or already in Apache2/
                                unless ($v =~ /Apache2/) {
                                - $v =~ s|(blib/lib)|$1/Apache2|;
                                + $v =~ s{ (blib[/\\:]lib) }{ catdir($1, 'Apache2')}xe;
                                }

                                $pm->{$k} = $v;
                                ===============================================================
                                > > One consideration about this - if someone has a Win32 build
                                > > under the current system (where some files are under an
                                > > Apache2/, and others aren't), and then installs a build with
                                > > a patch like above applied where everything gets put under
                                > > an Apache2/, there'll be duplicates of some files. I think
                                > > using Apache2.pm will pick up the newer files installed
                                > > under an Apache2/, in preference to the older ones which
                                > > weren't, as @INC will have D:/Perl/site/lib/Apache2 before
                                > > D:/Perl/site/lib, so that should be OK. However, perhaps we
                                > > should think about unlinking the old files not under an
                                > > Apache2/?
                                >
                                > Sure, we can arrange that, via the .packlist, like we do
                                > for Apache::test in Apache::Test. Though it's dangerous.
                                > Consider the following scenario.
                                >
                                > 1) Install a fresh perl
                                > 2) Install mp2 w/o Apache2
                                > 3) Install mp1 which now overwrites some of the mp2 files
                                > 4) Install mp2 w/ Apache2 and uninstall files not under Apache2
                                >
                                > results - you will ruin the mp1 install from (3).
                                >
                                > In the test suite we make sure that we load files from
                                > Apache2/ first. Users can do the same, in which case there
                                > is no problem. There is no problem if someone installs
                                > into Apache2/ and then decides to install into the main
                                > @INC. When this happens Apache2.pm will be rewritten not
                                > to prepend Apache2 dirs into @INC.
                                >
                                > So may be let's just keep it there.

                                Good idea - I hadn't thought of the above scenario.

                                --
                                best regards,
                                randy

                                --
                                Reporting bugs: http://perl.apache.org/bugs/
                                Mail list info: http://perl.apache.org/maillist/modperl.html
                              • Stas Bekman
                                ... +1, though probably also drop the () as they aren t needed now that File::Spec imports the functions. -my $apache_test_dir =
                                Message 15 of 17 , Nov 30, 2003
                                • 0 Attachment
                                  Randy Kobes wrote:
                                  > On Thu, 27 Nov 2003, Stas Bekman wrote:
                                  >
                                  >
                                  >>Randy Kobes wrote:
                                  >>[...]
                                  >>
                                  >>>I think it is a ModPerl::BuildMM thing - this patch
                                  >
                                  > [ .. ]
                                  >
                                  >>>arranges for everything to be put under an Apache2/.
                                  >>
                                  >>Cool. Though, it's probably easier to read:
                                  >>
                                  >> $v =~ s{(blib([/\\])lib)}{$1$2Apache2};
                                  >>
                                  >>or even:
                                  >>
                                  >> $v =~ s{ (blib[/\\]lib) }{ catdir $1, 'Apache2'}xe;
                                  >>
                                  >>I thought there is at least one more variation of the dir
                                  >>separator, wasn't it ':'?
                                  >
                                  >
                                  > Good point - how about
                                  > ===========================================================
                                  > Index: lib/ModPerl/BuildMM.pm

                                  +1, though probably also drop the () as they aren't needed now that File::Spec
                                  imports the functions.

                                  -my $apache_test_dir = File::Spec->catdir(Cwd::getcwd(), "Apache-Test", "lib");
                                  +my $apache_test_dir = catdir Cwd::getcwd(), "Apache-Test", "lib";

                                  etc... to be consistent with the rest of the code.

                                  --


                                  __________________________________________________________________
                                  Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
                                  http://stason.org/ mod_perl Guide ---> http://perl.apache.org
                                  mailto:stas@... http://use.perl.org http://apacheweek.com
                                  http://modperlbook.org http://apache.org http://ticketmaster.com


                                  --
                                  Reporting bugs: http://perl.apache.org/bugs/
                                  Mail list info: http://perl.apache.org/maillist/modperl.html
                                • Patricio Muñoz
                                  Hi, Finally, apache with mod_perl work fine, the sintaxis are: LoadFile d:/perl/bin/perl58.dll LoadModule perl_module modules/mod_perl.so [...] Alias /asp/
                                  Message 16 of 17 , Dec 1, 2003
                                  • 0 Attachment
                                    Hi,
                                    Finally, apache with mod_perl work fine, the sintaxis are:

                                    LoadFile "d:/perl/bin/perl58.dll"
                                    LoadModule perl_module modules/mod_perl.so

                                    [...]

                                    Alias /asp/ "D:/Apache/Apache2/asp/"
                                    <Perl>
                                    *CORE::GLOBAL::flock = sub { 1 };
                                    </Perl>
                                    PerlModule Apache::ASP
                                    <Directory "D:/Apache/Apache2/asp">
                                    Options Indexes MultiViews
                                    AllowOverride None
                                    Order allow,deny
                                    Allow from all
                                    <Files ~ (\.asp)>
                                    SetHandler perl-script
                                    PerlResponseHandler Apache::ASP
                                    PerlOptions +ParseHeaders
                                    PerlSetVar Global .
                                    PerlSetVar StateDir "D:/Apache/Apache2/asp/tmp"
                                    </Files>
                                    </Directory>

                                    Thank's all

                                    But when I test the sample in ASP, display errors
                                    This sample work fine in Win98 s.e. with PWS

                                    <html>
                                    <%
                                    Dim usuario, password, modem

                                    usuario = Request.Form("user")
                                    password = Request.Form("password")
                                    modem = Request.Form("modem")
                                    %>

                                    </head>
                                    <body>
                                    <form name="form" method="post">
                                    <input type="hidden" name="user" value=<%response.write usuario%>>
                                    <input type="hidden" name="pwd" value=<%response.write password%>>
                                    <input type="hidden" name="modem" value=<%response.write modem%>>
                                    </form>
                                    </body>
                                    </html>

                                    The same sample run in Win 98 s.e. + Apache 2.0.48 + mod_perl 1.99-dev Perl
                                    V5.8.1 display error, the logout error.log is

                                    [Mon Dec 01 16:54:32 2003] [error] [asp] [-805909] [debug] Bareword found
                                    where operator expected at D:/Apache/Apache2/asp/aplicacion/index.asp line
                                    6, near ") <--> password" <-->
                                    [Mon Dec 01 16:54:32 2003] [error] [asp] [-805909] [debug] (Missing
                                    operator before password?) <-->
                                    [Mon Dec 01 16:54:32 2003] [error] [asp] [-805909] [debug] Bareword found
                                    where operator expected at D:/Apache/Apache2/asp/aplicacion/index.asp line
                                    7, near ") <--> modem" <-->
                                    [Mon Dec 01 16:54:32 2003] [error] [asp] [-805909] [debug] (Missing
                                    operator before modem?) <-->
                                    [Mon Dec 01 16:54:32 2003] [error] [asp] [-805909] [error] error compiling
                                    index.asp: syntax error at D:/Apache/Apache2/asp/aplicacion/index.asp line
                                    6, near ") <--> password " <--> , D:/Perl/site/lib/Apache/ASP.pm line 1458

                                    Regards


                                    --
                                    Reporting bugs: http://perl.apache.org/bugs/
                                    Mail list info: http://perl.apache.org/maillist/modperl.html
                                  • Randy Kobes
                                    ... [...] ... [ .. ] You need to write the asp page using the Apache::ASP syntax - see http://www.apache-asp.org/ for discussion and samples. -- best regards,
                                    Message 17 of 17 , Dec 1, 2003
                                    • 0 Attachment
                                      On Mon, 1 Dec 2003, [iso-8859-1] Patricio Muñoz wrote:

                                      > Hi,
                                      > Finally, apache with mod_perl work fine, the sintaxis are:
                                      >
                                      > LoadFile "d:/perl/bin/perl58.dll"
                                      > LoadModule perl_module modules/mod_perl.so
                                      [...]
                                      > But when I test the sample in ASP, display errors
                                      > This sample work fine in Win98 s.e. with PWS
                                      >
                                      > <html>
                                      > <%
                                      > Dim usuario, password, modem
                                      >
                                      > usuario = Request.Form("user")
                                      > password = Request.Form("password")
                                      > modem = Request.Form("modem")
                                      > %>
                                      [ .. ]
                                      You need to write the asp page using the Apache::ASP
                                      syntax - see http://www.apache-asp.org/ for discussion
                                      and samples.

                                      --
                                      best regards,
                                      randy kobes

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