This is the software installed on my system:
Red Hat Enterprise Linux ES release 4
httpd-2.0.54
mod_perl-2.0.1
This is the configuration in my httpd.conf file:
LoadModule perl_module modules/mod_perl.so
PerlRequire /usr/my/dev/lib/My/bootstrapper.pl
SetHandler modperl
PerlResponseHandler My::Handler
This is the content of /usr/my/dev/lib/My/bootstrapper.pl:
use lib '/usr/my/dev/lib';
open(STDERR, ">>/tmp/mod_perl.error.log") || die $!;
This is the content of /usr/my/dev/lib/My/Handler.pm:
package My::Handler;
use Apache2::RequestRec ();
use Apache2::RequestIO ();
use Apache2::Const -compile => qw(OK);
sub handler {
my $r = shift;
$r->print("hello_world");
# require Mozilla::LDAP::API;
return Apache2::Const::OK;
}
The problem is that if I uncomment the require line in the handler, I
get the following error message in /tmp/mod_perl.error.log:
Error loading Mozilla::LDAP::API: perldap_init failed
The solution might be related to the following XS code in API.xs:
BOOT:
if ( perldap_init() != 0) {
fprintf(stderr,
"Error loading Mozilla::LDAP::API: perldap_init failed\n");
exit(1);
}
So, perhaps perldap_init() is being called multiple times. Is there
something I can try in mod_perl to avoid this kind of problem? Can I
provide more information to help solve this problem?
--
Marc Tardif
Sitepak
(514) 866-8883