A the logfile says, i execute the method using Apache2.

For a better understanding:

  my $cl = ($self->{'MOD_PERL_VERSION'} == 1) ?
    $r->header_in('Content-length') : $r->headers_in->{'Content-length'};

This is the code Apache2::SOAP module uses for determining the version of modperl.
The $self->{'MOD_PERL_VERSION'} gets set in the new method, where the code seems to fail at all.. so the version is never set to two.

codepiece cut from Apache2::SOAP:
sub new {
  my $self = shift;
  unless (ref $self) {
    my $class = ref($self) || $self;
    $self = $class->SUPER::new(@_);
    SOAP::Trace::objects('()');
  }
 MOD_PERL: {
    (eval { require Apache;} ) and do {
       require Apache::Constants;
       Apache::Constants->import('OK');
       $self->{'MOD_PERL_VERSION'} = 1;
       last MOD_PERL;
     };

    (eval { require Apache2::RequestRec;} ) and do {
      require Apache2::RequestUtil;
      require Apache2::RequestIO;
      require Apache2::Const;
      require APR::Table;
      Apache2::Const->import(-compile => 'OK');
      $self->{'MOD_PERL_VERSION'} = 2;

      print "!!MOD PERL VERSION DEFINED!!";
      last MOD_PERL;
    };
    die "Unsupported version of mod_perl";
  }
  return $self;
}

I've found some quite interesting postings at
http://www.gossamer-threads.com/lists/modperl/dev/9637
though, dont know what to dow now at all, is it a  bug at modperl or just a configuration bug?

Hopefully the 2nd one.

Sorry for the 2nd reply tom, missclicked and havn't had the list in CC

Thank you,
Georg


On 8/2/06, Tom Schindl <[EMAIL PROTECTED]> wrote:
Georg Grabler schrieb:
> I'm experiencing Problems with the setting written above.
>
> Currently, i'm running the configuration as written in the header.
>
> The apache config (by doing make test) outputs the following:
>
>
> [Wed Aug 02 10:15:10 2006] [notice] Apache/2.2.2 (Unix) mod_perl/2.0.2
> Perl/v5.8.2 configured -- resuming normal operations
> [Wed Aug 02 10:15:10 2006] [info] Server built: Jul  5 2006 10:11:34
> [Wed Aug 02 10:15:10 2006] [debug] prefork.c(991): AcceptMutex: sysvsem
> (default: sysvsem)
> [Wed Aug 02 10:15:15 2006] [error] [client 127.0.0.1 < http://127.0.0.1>]
> Can't locate object method "header_in" via package "Apache2::RequestRec"
> at /home/ggrabler/Apache2-SOAP-0.71/blib/lib/SOAP/Transport/HTTP2.pm
> line 96.\n

Well you are true the method is misspelled.
http://perl.apache.org/docs/2.0/api/Apache2/RequestRec.html#C_headers_in_

> [Wed Aug 02 10:15:16 2006] [error] [client 127.0.0.1 <http://127.0.0.1>]
> Can't locate object method "header_in" via package "Apache2::RequestRec"
> at /home/ggrabler/Apache2- SOAP-0.71/blib/lib/SOAP/Transport/HTTP2.pm
> line 96.\n
> [Wed Aug 02 10:15:16 2006] [info] removed PID file
> /home/ggrabler/Apache2- SOAP-0.71/t/logs/httpd.pid (pid=52148)
> [Wed Aug 02 10:15:16 2006] [notice] caught SIGTERM, shutting down
>
>
> Well, if i force the install i also get this error on my main server
> configuration ;). To ensure it's not a problem with AIX compiler
> (vac/cc_r), i set up the whole configuration as well using ARCH Linux,
> with the same result.
>
> Since i wanted to solve the problem myself, i looked up the code of the
> HTTP2.pm. It seems as if it's mod_perl which cuases those troubles,
> though, as we can see i've got the latest mod_perl installed.
>
> The sub new also did show me that the MOD_PERL_VERSION is manually set,
> by determining if Apache2::RequestRec is loading... what doesn't seem to
> happen.
>
> Therefore MOD_PERL_VERSION is set to 1, and i get this error as if i was
> using mod_perl version 1.
>
> If i manually set the MOD_PERL_VERSION to 2 in the HTTP2.pm, it works ..
> not properly though.
>
> I wrote a small testfile, what does the following:
>
> require Apache2::RequestRec;
>
>
> (eval { require Apache2::RequestRec;} ) and do {
>       require Apache2::RequestUtil;
>       require Apache2::RequestIO;
>       require Apache2::Const;
>       require APR::Table;  ## This line seems to fail..
>       Apache2::Const->import(-compile => 'OK');
>       $MOD_PERL_VERSION = 2;
>       print "!!MOD PERL VERSION DEFINED!!";
>       last MOD_PERL;
>     };
> if ($MOD_PERL_VERSION == 2) {
>   print "ZWEI";
>
> }
>

Where do you execute this script? in the shell that's not possible.

Tom

Reply via email to