perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: mod_perl 2 / %ENV / "system" function
Date Wed, 09 Jun 2004 09:09:31 GMT
Hèctor Alòs i Font wrote:
> En/na Stas Bekman ha escrit:
>> Hèctor Alòs i Font wrote:
>>> En/na Stas Bekman ha escrit:
>>>> Hèctor Alòs i Font wrote:
>>>>> I'm migrating a web application from mod_perl 1 to mod_perl 2 [new 
>>>>> environment: Apache/2.0.49 (Unix) mod_perl/1.99_14 Perl/v5.8.4].
>>>>> The problem is that in some places the %ENV variable is used to 
>>>>> pass parameters to programmes called via "system". Now these 
>>>>> variables are not found in the called programme. E.g.
>>>> Right, environ is not tied in mp2 due to threads issues. Please take 
>>>> a look at:

>>> Thanks for the answer. In fact I saw this piece of documentation 
>>> already, but I'm not sure it suits for my case: as I understand, we 
>>> might push the parameters in the startup file... but that's useless 
>>> if we really want to pass a parameter which is changing from one 
>>> execution to the other (not in the case of $ORACLE_PATH). It seems 
>>> that I'll have to change quite a little amount of code :-(
>> You understand why we can't change the C environ, right? We had to 
>> write code to decouple it so %ENV will work correctly under threads. 
>> Without this decoupling a hell breaks loose as one thread will affect 
>> %ENV of all other threads (well perl interpreters in our case)
>> Try Env::C if you are using prefork.
> Yes, I understand pretty well. Fortunately i'm not using threads, so 
> this module would perfectly suits... but i'm woking under Solaris and 
> the module does not build under it: i'll have to make a patch, change 
> the web programme or do not upgrade to mod_perl 2. I'm not sure i'll be 
> able to do the first. Thanks for the help.

Right, if you or someone submits patches to make Env::C working on Solaris I'd 
gladly apply them. I also need patches to make it working under mswin32.

Now that I think of it, Env::C is probably not the best name for this module, 
but the idea came from being able to modify things that C sees, from Perl :)

Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker     mod_perl Guide --->

Report problems:
Mail list info:
List etiquette:

View raw message