Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 37205 invoked from network); 9 Jun 2004 09:09:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 9 Jun 2004 09:09:52 -0000 Received: (qmail 65825 invoked by uid 500); 9 Jun 2004 09:10:04 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 65802 invoked by uid 500); 9 Jun 2004 09:10:04 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 65788 invoked by uid 99); 9 Jun 2004 09:10:04 -0000 Message-ID: <40C6D3CB.2080506@stason.org> Date: Wed, 09 Jun 2004 02:09:31 -0700 From: Stas Bekman Organization: Hope, Humanized User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040115 X-Accept-Language: en-us, en, he, ru MIME-Version: 1.0 To: =?ISO-8859-1?Q?H=E8ctor_Al=F2s_i_Font?= Cc: modperl@perl.apache.org Subject: Re: mod_perl 2 / %ENV / "system" function References: <40C4468E.1060503@sofresam.com> <40C5A763.9090706@stason.org> <40C5B900.10003@sofresam.com> <40C5C47F.1090500@stason.org> <40C6B369.4050803@sofresam.com> In-Reply-To: <40C6B369.4050803@sofresam.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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: >>>> http://perl.apache.org/docs/2.0/user/troubleshooting/troubleshooting.html#C_Libraries_Don_t_See_C__ENV__Entries_Set_by_Perl_Code >>>> >>>> >>>> >>> 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 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 -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html