You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-dev@httpd.apache.org by William McKee <wi...@knowmad.com> on 2004/03/15 00:11:40 UTC
Errors testing under Win32
I'm running into a problem when doing testing under Win32 that doesn't
happen when testing in Linux or when I run my program in Win32 with
Apache2 and modperl (Randy's binary).
The error is as follows:
[Sun Mar 14 18:02:02 2004] [error] [client 127.0.0.1] Can't locate object method
"send_cgi_header" via package "Apache::RequestRec" at (eval 93) line 62.
I can't find much information at all in the archives or on the web. It
doesn't make sense to me why my scripts would work under Apache but not
when called with Apache::Test. Any ideas? Any suggestions for tracking
this down? I really don't know where to start.
Thanks again,
William
--
Knowmad Services Inc.
http://www.knowmad.com
Re: Errors testing under Win32
Posted by Stas Bekman <st...@stason.org>.
William McKee wrote:
> On Mon, Mar 15, 2004 at 03:37:26PM -0800, Stas Bekman wrote:
>
>>>Actually, there is no 'PerlModule Apache::Response' directive in my
>>>normal setup and I'm not loading an external startup.pl file.
>>
>>Yes, but it could have been loaded indirectly by some module, e.g. CGI.pm
>>or Apache::compat, that you have loaded from httpd.conf.
>
>
> OK, that makes sense. Looks like it may be ModPerl::Registry which is
> drawing it into play when I run my scripts via the Apache server.
That's right.
>>>>You should load this and any other required modules from the code that
>>>>uses it, not at the server startup. (you load at the server startup to
>>>>speed things up, not as a substitute to the loading from the handler's
>>>>module).
>
>
> So although it works to put 'PerlModule Apache::Response' into my httpd
> config, you're suggesting that I include it in my scripts? I can see
> where that would be the best solution for maximum portability. I'll make
> that change.
You should always do that. We have explained that in our book
http://modperlbook.org and I think you can find the explanations somewhere in
the perl.apache.org docs. If you can't find it, let me know, I'll try to get it.
>>But please read:
>>http://perl.apache.org/docs/2.0/user/porting/porting.html#Using_C_ModPerl__MethodLookup__to_Discover_Which_mod_perl_2_0_Modules_Need_to_Be_Loaded
>
>
> Thanks for the link. While reading it, I discovered there's a whole
> other part of the MP2 docs at perl.apache.org. So far, I had only found
> the "Starting with 2.0" and "Migrating to 2.0" sections.
Try:
http://perl.apache.org/docs/2.0/index.html
>>http://perl.apache.org/docs/2.0/api/index.html is being slowly improved,
>>but it will take a long time till it will get completed unless more people
>>will contribute, since we have just a few hands.
>
>
> Is this why you don't have a link in the menu bar to "The 2.0 guide"? It
> would have been a long time before I found all the useful, albeit
> incomplete, info without your link. FWIW, I think it would be useful to
> include a link to the 2.0 material.
It's linked from Documentation. Though not from the shortcuts menu. See the
link above.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
Re: Errors testing under Win32
Posted by William McKee <wi...@knowmad.com>.
On Mon, Mar 15, 2004 at 03:37:26PM -0800, Stas Bekman wrote:
> >Actually, there is no 'PerlModule Apache::Response' directive in my
> >normal setup and I'm not loading an external startup.pl file.
>
> Yes, but it could have been loaded indirectly by some module, e.g. CGI.pm
> or Apache::compat, that you have loaded from httpd.conf.
OK, that makes sense. Looks like it may be ModPerl::Registry which is
drawing it into play when I run my scripts via the Apache server.
> >>You should load this and any other required modules from the code that
> >>uses it, not at the server startup. (you load at the server startup to
> >>speed things up, not as a substitute to the loading from the handler's
> >>module).
So although it works to put 'PerlModule Apache::Response' into my httpd
config, you're suggesting that I include it in my scripts? I can see
where that would be the best solution for maximum portability. I'll make
that change.
> But please read:
> http://perl.apache.org/docs/2.0/user/porting/porting.html#Using_C_ModPerl__MethodLookup__to_Discover_Which_mod_perl_2_0_Modules_Need_to_Be_Loaded
Thanks for the link. While reading it, I discovered there's a whole
other part of the MP2 docs at perl.apache.org. So far, I had only found
the "Starting with 2.0" and "Migrating to 2.0" sections.
> http://perl.apache.org/docs/2.0/api/index.html is being slowly improved,
> but it will take a long time till it will get completed unless more people
> will contribute, since we have just a few hands.
Is this why you don't have a link in the menu bar to "The 2.0 guide"? It
would have been a long time before I found all the useful, albeit
incomplete, info without your link. FWIW, I think it would be useful to
include a link to the 2.0 material.
Thanks,
William
--
Knowmad Services Inc.
http://www.knowmad.com
Re: Errors testing under Win32
Posted by Stas Bekman <st...@stason.org>.
William McKee wrote:
> On Mon, Mar 15, 2004 at 01:22:20PM -0800, Stas Bekman wrote:
>
>>have you loaded Apache::Response?
>
>
> No, I wasn't aware that I needed to specify this module.
>
>
>
>>Probably because your startup/config setups are different. You loaded
>>'Apache::Response' in your normal setup, but not in your A-t setup.
>
>
> Actually, there is no 'PerlModule Apache::Response' directive in my
> normal setup and I'm not loading an external startup.pl file.
Yes, but it could have been loaded indirectly by some module, e.g. CGI.pm or
Apache::compat, that you have loaded from httpd.conf.
>>You should load this and any other required modules from the code that
>>uses it, not at the server startup. (you load at the server startup to
>>speed things up, not as a substitute to the loading from the handler's
>>module).
>
>
> OK, I tried adding the PerlModule Apache::Response line to my
> extra.conf.in file and doing my tests. They ran fine minus a few
> OS-specific errors.
>
> Of course this result begs the question, why do these tests work for
> testing and production without use'ing 'Apache::Response' in Linux/mp1
> (I checked both httpd.conf and startup.pl; neither refer to A::Response)
> as well as in production in Win32/mp2 (i.e., running apache as usual;
> even works in single server mode) but fail when tested via A::T?
see above.
> BTW, I tried to find documentation for Apache::Response on CPAN but
> there's no reference to it. Didn't find anything in the Eagle book or in
> _mod_perl Developer's Cookbook_. The description at perl.apache.org is
> "To be completed".
It was added in mod_perl 2, you won't find it in mentioned in these books. But
please read:
http://perl.apache.org/docs/2.0/user/porting/porting.html#Using_C_ModPerl__MethodLookup__to_Discover_Which_mod_perl_2_0_Modules_Need_to_Be_Loaded
http://perl.apache.org/docs/2.0/api/index.html is being slowly improved, but
it will take a long time till it will get completed unless more people will
contribute, since we have just a few hands.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
Re: Errors testing under Win32
Posted by William McKee <wi...@knowmad.com>.
On Mon, Mar 15, 2004 at 01:22:20PM -0800, Stas Bekman wrote:
> have you loaded Apache::Response?
No, I wasn't aware that I needed to specify this module.
> Probably because your startup/config setups are different. You loaded
> 'Apache::Response' in your normal setup, but not in your A-t setup.
Actually, there is no 'PerlModule Apache::Response' directive in my
normal setup and I'm not loading an external startup.pl file.
> You should load this and any other required modules from the code that
> uses it, not at the server startup. (you load at the server startup to
> speed things up, not as a substitute to the loading from the handler's
> module).
OK, I tried adding the PerlModule Apache::Response line to my
extra.conf.in file and doing my tests. They ran fine minus a few
OS-specific errors.
Of course this result begs the question, why do these tests work for
testing and production without use'ing 'Apache::Response' in Linux/mp1
(I checked both httpd.conf and startup.pl; neither refer to A::Response)
as well as in production in Win32/mp2 (i.e., running apache as usual;
even works in single server mode) but fail when tested via A::T?
BTW, I tried to find documentation for Apache::Response on CPAN but
there's no reference to it. Didn't find anything in the Eagle book or in
_mod_perl Developer's Cookbook_. The description at perl.apache.org is
"To be completed".
Thanks again!
William
--
Knowmad Services Inc.
http://www.knowmad.com
Re: Errors testing under Win32
Posted by Stas Bekman <st...@stason.org>.
William McKee wrote:
> I'm running into a problem when doing testing under Win32 that doesn't
> happen when testing in Linux or when I run my program in Win32 with
> Apache2 and modperl (Randy's binary).
>
> The error is as follows:
>
> [Sun Mar 14 18:02:02 2004] [error] [client 127.0.0.1] Can't locate object method
> "send_cgi_header" via package "Apache::RequestRec" at (eval 93) line 62.
have you loaded Apache::Response?
> I can't find much information at all in the archives or on the web. It
> doesn't make sense to me why my scripts would work under Apache but not
> when called with Apache::Test. Any ideas? Any suggestions for tracking
> this down? I really don't know where to start.
Probably because your startup/config setups are different. You loaded
'Apache::Response' in your normal setup, but not in your A-t setup. You should
load this and any other required modules from the code that uses it, not at
the server startup. (you load at the server startup to speed things up, not as
a substitute to the loading from the handler's module).
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com