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

Can't locate object method "new" via package "Apache"

Expand Messages
  • modperl@gmx.net
    Hi All I m trying to get the whole http request body with something like: use Apache (); my $r = Apache- request; also tried: use Apache::Request; my $apr =
    Message 1 of 4 , Dec 1, 2003
    • 0 Attachment
      Hi All

      I'm trying to get the whole http request body with something like:

      use Apache ();
      my $r = Apache->request;

      also tried:

      use Apache::Request;
      my $apr = Apache::Request->new($r);

      but failed with the following in the error log:

      Can't locate object method "new" via package "Apache" (perhaps you forgot to
      load "Apache"?)
      Can't locate object method "new" via package "Apache::Request" (perhaps you
      forgot to load "Apache::Request"?)

      Apache and Apache::Request is installed. I also installed libapreq via ppm.
      My environment:
      WinXP and NT4 with
      Perl 5.6.1
      Apache/1.3.26 (Win32) mod_ssl/2.8.10 OpenSSL/0.9.6d mod_perl/1.27_01-dev
      (Randy Kobes binaries)
      Ohter mod_perl requests using e.g. CGI.pm are working well.

      Thanks in advance

      Josi Ender




      --
      Neu bei GMX: Preissenkung f�r MMS-Versand und FreeMMS!

      Ideal f�r alle, die gerne MMS verschicken:
      25 FreeMMS/Monat mit GMX TopMail.
      http://www.gmx.net/de/cgi/produktemail

      +++ GMX - die erste Adresse f�r Mail, Message, More! +++


      --
      Reporting bugs: http://perl.apache.org/bugs/
      Mail list info: http://perl.apache.org/maillist/modperl.html
    • Randy Kobes
      ... Is this for a script that s being run from the command line? If so, this may be the expected behaviour, as some Apache modules require you to be in an
      Message 2 of 4 , Dec 1, 2003
      • 0 Attachment
        On Mon, 1 Dec 2003 modperl@... wrote:

        > Hi All
        >
        > I'm trying to get the whole http request body with something like:
        >
        > use Apache ();
        > my $r = Apache->request;
        >
        > also tried:
        >
        > use Apache::Request;
        > my $apr = Apache::Request->new($r);
        >
        > but failed with the following in the error log:
        >
        > Can't locate object method "new" via package "Apache" (perhaps you forgot to
        > load "Apache"?)
        > Can't locate object method "new" via package "Apache::Request" (perhaps you
        > forgot to load "Apache::Request"?)
        >
        > Apache and Apache::Request is installed. I also installed libapreq via ppm.

        Is this for a script that's being run from the command line?
        If so, this may be the expected behaviour, as some Apache
        modules require you to be in an Apache environment to work.
        If this is an error from a script or handler being run from
        within Apache, can you post a minimal example, plus
        configuration details, that illustrates the problem?

        --
        best regards,
        randy kobes

        --
        Reporting bugs: http://perl.apache.org/bugs/
        Mail list info: http://perl.apache.org/maillist/modperl.html
      • Randy Kobes
        ... Another thought on this - did you install libapreq through the ActiveState ppm repository? That particular package doesn t work in a mod_perl environment -
        Message 3 of 4 , Dec 1, 2003
        • 0 Attachment
          On Mon, 1 Dec 2003 modperl@... wrote:

          > Hi All
          >
          > I'm trying to get the whole http request body with something like:
          >
          > use Apache ();
          > my $r = Apache->request;
          >
          > also tried:
          >
          > use Apache::Request;
          > my $apr = Apache::Request->new($r);
          >
          > but failed with the following in the error log:
          >
          > Can't locate object method "new" via package "Apache" (perhaps you forgot to
          > load "Apache"?)
          > Can't locate object method "new" via package "Apache::Request" (perhaps you
          > forgot to load "Apache::Request"?)
          >
          > Apache and Apache::Request is installed. I also installed libapreq via ppm.
          > My environment:
          > WinXP and NT4 with
          > Perl 5.6.1
          > Apache/1.3.26 (Win32) mod_ssl/2.8.10 OpenSSL/0.9.6d mod_perl/1.27_01-dev

          Another thought on this - did you install libapreq through
          the ActiveState ppm repository? That particular package
          doesn't work in a mod_perl environment - try installing the
          one we have here via (all on one line)
          C:\> ppm install
          http://theoryx5.uwinnipeg.ca/ppmpackages/libapreq.ppd

          --
          best regards,
          randy kobes

          --
          Reporting bugs: http://perl.apache.org/bugs/
          Mail list info: http://perl.apache.org/maillist/modperl.html
        • modperl@gmx.net
          On 1 Dec 2003 at 10:30, Randy Kobes wrote: Hello Randy magic! I catched all the information for you, played around again with my script and now it works! Looks
          Message 4 of 4 , Dec 1, 2003
          • 0 Attachment
            On 1 Dec 2003 at 10:30, Randy Kobes wrote:

            Hello Randy

            magic! I catched all the information for you, played around again
            with my script and now it works!
            Looks like the problem was in my script.

            Many thanks for your help!

            regards,
            Josi Ender

            > On Mon, 1 Dec 2003 modperl@... wrote:
            >
            > > Hi All
            > >
            > > I'm trying to get the whole http request body with something like:
            > >
            > > use Apache ();
            > > my $r = Apache->request;
            > >
            > > also tried:
            > >
            > > use Apache::Request;
            > > my $apr = Apache::Request->new($r);
            > >
            > > but failed with the following in the error log:
            > >
            > > Can't locate object method "new" via package "Apache" (perhaps you forgot to
            > > load "Apache"?)
            > > Can't locate object method "new" via package "Apache::Request" (perhaps you
            > > forgot to load "Apache::Request"?)
            > >
            > > Apache and Apache::Request is installed. I also installed libapreq via ppm.
            >


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