You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Oskar Ahner <os...@osz.nu> on 2006/09/10 23:17:28 UTC
Failure to load Embperl with PerlModule directive
Hi all!
I have:
apache httpd-2.2.3
mod_perl-2.0.2
Embperl-2.2.0
where mod_perl is statically linked to httpd.
Now I try to load Embperl from httpd.conf with this directive:
PerlModule Embperl
When I start apache I get this error:
[Sun Sep 10 23:10:00 2006] [error] panic: memory wrap at
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Embperl.pm line
108.\nCompilation failed in require at (eval 2) line 3.\n
[Sun Sep 10 23:10:00 2006] [error] Can't load Perl module Embperl for
server localhost:80, exiting...
However, if I try to use this directive instead:
PerlPostConfigRequire "/home/user/startup.pl"
where startup.pl has this contents:
use Embperl;
1;
It works!
But why? As I understand it, it should not make any difference to invoke
PerlModule compared to invoke PerlPostConfigRequire except when in time
during the apache start process processes the directive.
Regards,
Oskar Ahner
Re: Failure to load Embperl with PerlModule directive
Posted by Oskar Ahner <os...@osz.nu>.
Gerald Richter wrote:
> Hi all!
>> I have:
>>
>> apache httpd-2.2.3
>> mod_perl-2.0.2
>> Embperl-2.2.0
>>
>> where mod_perl is statically linked to httpd.
>>
>> Now I try to load Embperl from httpd.conf with this directive:
>>
>> PerlModule Embperl
>>
>
> You also need a
>
> LoadModule embperl_module /path/to/Embperl.so
>
> Before the PerlModule Embperl statement in your httpd.conf
Ok, but that is the tricky part to understand. I have build apache with
mod_perl dynamically the old way, i.e. _not_ DSO (mod_perl is
dynamically linked to httpd and will be linked in when the process
starts). So, my question is: why do I have to invoke LoadModule on the
Embperl module? I think this way: when httpd starts the mod_perl.so is
dynamically linked into the processpace of the httpd process. After that
has happen , the perl intepreter is a part of each apache process. (Am i
right here? Now Embperl.pm can be loaded as an ordinary perl module with
the PerlModule directive. Now its up to perl to take care of the loading
of Embperl.pm, which should happen behind the scenes (perl searches the
@INC for the Embperl.pm at compile time, or if the DynaLoader is used?).
Can anybody explain this ? I'm afraid that I don't really understand this.
If I put it this way: What does exactly static vice dynamic means when
dealing with apache/mod_perl/Embperl ? If I build mod_perl static
according to the Install document for mod_perl, then Embperl also is
static per auto, or can Embperl be dynamic within mod_perl even if
mod_perl is static built?
Regards,
Oskar Ahner
>
>> However, if I try to use this directive instead:
>> PerlPostConfigRequire "/home/user/startup.pl"
>>
>> where startup.pl has this contents:
>>
>> use Embperl;
>> 1;
>>
>> It works!
>>
>> But why? As I understand it, it should not make any
>> difference to invoke PerlModule compared to invoke
>> PerlPostConfigRequire except when in time during the apache
>> start process processes the directive.
>>
>
> I guess this is only chance. It will fail sooner or later without the
> LoadModule
>
> Gerald
>
>
>
> ** Virus checked by BB-5000 Mailfilter **
RE: Failure to load Embperl with PerlModule directive
Posted by Gerald Richter <ri...@ecos.de>.
Hi all!
>
> I have:
>
> apache httpd-2.2.3
> mod_perl-2.0.2
> Embperl-2.2.0
>
> where mod_perl is statically linked to httpd.
>
> Now I try to load Embperl from httpd.conf with this directive:
>
> PerlModule Embperl
>
You also need a
LoadModule embperl_module /path/to/Embperl.so
Before the PerlModule Embperl statement in your httpd.conf
>
> However, if I try to use this directive instead:
> PerlPostConfigRequire "/home/user/startup.pl"
>
> where startup.pl has this contents:
>
> use Embperl;
> 1;
>
> It works!
>
> But why? As I understand it, it should not make any
> difference to invoke PerlModule compared to invoke
> PerlPostConfigRequire except when in time during the apache
> start process processes the directive.
>
I guess this is only chance. It will fail sooner or later without the
LoadModule
Gerald
** Virus checked by BB-5000 Mailfilter **