>
> You should use:
>
> Apache->server->log_error("test3.pm::BEGIN");
>
> if you don't have $r, or $r->log_error() inside the handler.
>
> I don't think this is any different from 1.0
it is, because with 1.0, I can happily use "Apache::log_error", which
I have done at numerous places.
> > package test3;
> >
> > use strict;
> >
> > use Apache2;
> > use Apache::compat;
> >
> > use Apache::RequestRec();
> > use Apache2::Apache::RequestRec();
> > use Apache::Connection;
> > use Apache::Constants qw(:common);
> > use Apache::Log();
> > use Apache2::APR::Table();
>
> drop those Apache2:: prefixes!
already done, but they don't influence the behaviour.
> > BEGIN {
> > print("test3.pm::BEGIN\n");
> > Apache::log_error("test3.pm::BEGIN");
> > }
>
> But why do you put it inside BEGIN? Apache::compat is not loaded before
> that. Why don't you put it inside startup.pl or httpd.conf?
^^^^^^^^^^
1) see below. 2) why does it work (when I add Apache::log_error to
compact.pm)?
> > The compat-mode should only need you to include two lines:
> > use Apache2;
> > use Apache::compat;
> > and no additional modifications. Otherwise, it would be a
> > "not-so-compat-mode", correct? ;-)
>
> yes, but you should put them at the startup.
well, I tried. I also tried "PerlModule Apache2" "PerlModule Apache::compat"
in httpd.conf, but that didn't help.
anyway, I have a different problem now. When I use the latest snapshot,
apache will segfault. to reproduces it, it is sufficient to only
add one configuration line to httpd.conf, and that is
"LoadModule perl_module modules/mod_perl.so".
I am using httpd-2.0.36
gdb says:
(gdb) bt
#0 0x40166728 in strcmp () from /lib/libc.so.6
#1 0x80bc2fd in ap_exists_config_define (name=0x81c4820 "SSL") at core.c:1790
#2 0x80bc389 in start_ifdefine (cmd=0xbfffb2b0, dummy=0xbfff9100,
arg=0x81c4818 "SSL>") at core.c:1816
#3 0x80ad5a4 in invoke_cmd (cmd=0x8145ac0, parms=0xbfffb2b0,
mconfig=0xbfff9100, args=0xbfff916a "") at config.c:699
#4 0x80ae553 in execute_now (cmd_line=0x81c47e0 "<IfDefine",
args=0xbfff9166 "SSL>", parms=0xbfffb2b0, p=0x81763c0, ptemp=0x82653f8,
sub_tree=0xbfff9100, parent=0x0) at config.c:1310
#5 0x80add5d in ap_build_config_sub (p=0x81763c0, temp_pool=0x82653f8,
l=0xbfff915c "<IfDefine SSL>", parms=0xbfffb2b0, current=0xbfff9154,
...
and so on. hm. seems also SSL-related? (allthough I do *NO* start the
server with -DSSL). If I put the SSL-lines under comment, it will ..
tataa.... mod-perl will start... good. unfortunately, I *do* need
SSL.
test3.pm now looks like this:
---
package test3;
use strict;
use Apache::Log();
BEGIN {
print("test3.pm::BEGIN\n");
Apache::log_error("test3.pm::BEGIN");
}
and httpd.conf:
--
LoadModule perl_module modules/mod_perl.so
PerlModule Apache2
PerlModule Apache::compat
PerlRequire /root/conf/startup.pl
PerlModule test3
startup.pl does nothing but a "use lib", that's all.
Only If I add "log_error" to Apache2/Apache/compat.pm, the function is
defined.
Do you agree that "Apache::log_error" is v1.0 functionality and should
be available in v2.0-compat-mode?
/herp
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]