Re: Can't locate object method request via package Apache

2007-07-11 Thread Helmut Zeilinger

Hi Tim,

(like i postet Tidal 2 months ago on this list)

you might try a patch from Maurice Yarrow:

see

http://www.gossamer-threads.com/lists/modperl/asp/89060?search_string=yarrow;#89060 



(approx. bottom quarter of the page)


Helmut


T R Stickland schrieb:
[First a quick hello.   We (http://edina.ac.uk/) have been using 
Apache::ASP for a few years, but you haven't heard much from us as 
it's worked pretty well!]


For the first time I've built apache2 (apache 2.2.4, mod_perl 2.0.3) 
for use with ASP (2.59).   The build and configuration went fine.   
The web server started up and was fine until the first time I tried to 
access an ASP application.


   Can't locate object method request via package Apache at 
[...]/perl5/lib/perl5/site_perl/5.8.0//Apache/ASP.pm line 165.

...and that line is...


   my $rtest = $ModPerl2 ? Apache2::RequestUtil-request() : 
Apache-request();

It's calling Apache-request when should be calling 
Apache2::RequestUtil-request (it's mod_perl version 2.0.3).So 
it's the $ModPerl2 flag.   Line 66 of ASP.pm initialized it:


   $ModPerl2 = ($mod_perl::VERSION = 1.99);

Now it turns out $mod_perl::VERSION is 1.30.   There's an easy 
workaround using $ENV{MOD_PERL_API_VERSION}


   $ModPerl2 = ($ENV{MOD_PERL_API_VERSION} = 2);

I see this has occurred before, though the error reported was 
different, and also in that case  $mod_perl::VERSION was undefined 
rather than having the wrong value.See:  
http://tech.groups.yahoo.com/group/apache-asp/message/2136


On one hand the workaround is OK, and I'm not keen to guddle about in 
the mod_perl code.  On the other hand, I'm not really happy just 
ignoring the fact that $mod_perl::VERSION is wrong...


Anyone know the cause and/or better fix? 
tim




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can't locate object method request via package Apache

2007-07-11 Thread T R Stickland

Thanks Helmut.

My patch is similar to Maurice's, except that his allows for 
$mod_perl::VERSION to be an empty string.  In my case it has been 
assigned the value 1.30.   Maurice's patch would just use this 
value.   So in my case I ignore $mod_perl::VERSION altogether and use 
$ENV{MOD_PERL_API_VERSION}.


Maybe worth noting that, I think, $ENV{MOD_PERL_API_VERSION} is the API 
version rather than the mod_perl version?  So I'd expect to see a value 
2 rather than 2.0.3 or whatever.  That means it's not strictly 
interchangeable with $mod_perl::VERSION, but the distinction is pretty 
much immaterial to Maurice's and my own patch, at least at the moment.


tim



Helmut Zeilinger wrote:

Hi Tim,

(like i postet Tidal 2 months ago on this list)

you might try a patch from Maurice Yarrow:

see

http://www.gossamer-threads.com/lists/modperl/asp/89060?search_string=yarrow;#89060 



(approx. bottom quarter of the page)


Helmut


T R Stickland schrieb:
[First a quick hello.   We (http://edina.ac.uk/) have been using 
Apache::ASP for a few years, but you haven't heard much from us as 
it's worked pretty well!]


For the first time I've built apache2 (apache 2.2.4, mod_perl 2.0.3) 
for use with ASP (2.59).   The build and configuration went fine.   
The web server started up and was fine until the first time I tried 
to access an ASP application.


   Can't locate object method request via package Apache at 
[...]/perl5/lib/perl5/site_perl/5.8.0//Apache/ASP.pm line 165.

...and that line is...

   my $rtest = $ModPerl2 ? Apache2::RequestUtil-request() : 
Apache-request();
It's calling Apache-request when should be calling 
Apache2::RequestUtil-request (it's mod_perl version 2.0.3).So 
it's the $ModPerl2 flag.   Line 66 of ASP.pm initialized it:


   $ModPerl2 = ($mod_perl::VERSION = 1.99);

Now it turns out $mod_perl::VERSION is 1.30.   There's an easy 
workaround using $ENV{MOD_PERL_API_VERSION}


   $ModPerl2 = ($ENV{MOD_PERL_API_VERSION} = 2);
I see this has occurred before, though the error reported was 
different, and also in that case  $mod_perl::VERSION was undefined 
rather than having the wrong value.See:  
http://tech.groups.yahoo.com/group/apache-asp/message/2136


On one hand the workaround is OK, and I'm not keen to guddle about in 
the mod_perl code.  On the other hand, I'm not really happy just 
ignoring the fact that $mod_perl::VERSION is wrong...


Anyone know the cause and/or better fix? tim





--
Dr Tim Stickland
EDINA (http://edina.ac.uk/)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]