Re: setting environment variables

[prev] [thread] [next] [Date index for 2005/01/30]

From: Stef1
Subject: Re: setting environment variables
Date: 19:26 on 30 Jan 2005
This is a multi-part message in MIME format.
--------------030901050609000901030006
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Frank Wiles wrote:

>On Sun, 30 Jan 2005 11:47:50 +0200
>"Octavian Rasnita" <orasnita@xxx.xx> wrote:
>
>  
>
>>Hi,
>>
>>I have tried to put the following lines in httpd.conf:
>>
>>SetEnv user "gigel"
>>SetEnv pass "parola"
>>
>>Well, if I print the environment variables using a cgi script, they
>>are printed fine, but if I use MP, their values are not printed, and I
>>can see just a:
>>
>>user=
>>pass=
>>
>>Please tell me how can I do this to work fine with ModPerl also.
>>    
>>
>
>  Are you using MP1 or MP2?  If you're using MP2 in your configuration
>  are you doing: 
> 
>  SetHandler perl-script 
>
>  or 
>  
>  SetHandler modperl 
>
>  If you're doing the second one %ENV is not populated and the easiest
>  way to fix it is just to switch to using 'perl-script'.  
>  
>
But if you don't want the %ENV overhead, you can keep "SetHandler 
modperl" and put in your httpd.conf:
PerlSetVar user "gigel"

and in your handler access it through:
$user=$r->dir_config->get('user');

--Stef


>  If you're using MP1 then Geoffrey is right that this is probably a
>  bug.
>
> ---------------------------------
>   Frank Wiles <frank@xxxxx.xxx>
>   http://www.wiles.org
> ---------------------------------
>  
>

Stefan Loones
http://www.maygill.com


--------------030901050609000901030006
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Frank Wiles wrote:<br>
<blockquote type="cite"
 cite="mid20050130122008.1ab98c1d.frank@xxxxx.xxx">
  <pre wrap="">On Sun, 30 Jan 2005 11:47:50 +0200
"Octavian Rasnita" <a class="moz-txt-link-rfc2396E" href="mailto:orasnita@xxx.xx">&lt;orasnita@xxx.xx&gt;</a>; wrote:

  </pre>
  <blockquote type="cite">
    <pre wrap="">Hi,

I have tried to put the following lines in httpd.conf:

SetEnv user "gigel"
SetEnv pass "parola"

Well, if I print the environment variables using a cgi script, they
are printed fine, but if I use MP, their values are not printed, and I
can see just a:

user=
pass=

Please tell me how can I do this to work fine with ModPerl also.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
  Are you using MP1 or MP2?  If you're using MP2 in your configuration
  are you doing: 
 
  SetHandler perl-script 

  or 
  
  SetHandler modperl 

  If you're doing the second one %ENV is not populated and the easiest
  way to fix it is just to switch to using 'perl-script'.  
  </pre>
</blockquote>
But if you don't want the %ENV overhead, you can keep "SetHandler
modperl" and put in your httpd.conf:<br>
PerlSetVar user "gigel"<br>
<br>
and in your handler access it through:<br>
$user=$r-&gt;dir_config-&gt;get('user');<br>
<br>
<pre wrap="">--Stef</pre>
<br>
<blockquote type="cite"
 cite="mid20050130122008.1ab98c1d.frank@xxxxx.xxx">
  <pre wrap="">
  If you're using MP1 then Geoffrey is right that this is probably a
  bug.

 ---------------------------------
   Frank Wiles <a class="moz-txt-link-rfc2396E" href="mailto:frank@xxxxx.xxx">&lt;frank@xxxxx.xxx&gt;</a>;
   <a class="moz-txt-link-freetext" href="http://www.wiles.org">http://www.wiles.org</a>;
 ---------------------------------
  </pre>
</blockquote>
<pre wrap="">

Stefan Loones
<a class="moz-txt-link-freetext" href="http://www.maygill.com">http://www.maygill.com</a>;
</pre>
</body>
</html>

--------------030901050609000901030006--

(message missing)

setting environment variables
Octavian Rasnita 09:47 on 30 Jan 2005

Re: setting environment variables
Geoffrey Young 14:10 on 30 Jan 2005

Re: setting environment variables
colin_e 22:31 on 01 Feb 2005

Re: setting environment variables
Stas Bekman 03:52 on 02 Feb 2005

Re: setting environment variables
Randy Kobes 04:53 on 02 Feb 2005

Re: setting environment variables
Stas Bekman 13:18 on 02 Feb 2005

Re: setting environment variables
Frank Wiles 18:20 on 30 Jan 2005

Re: setting environment variables
Pratik 18:29 on 30 Jan 2005

Re: setting environment variables
Stef1 19:26 on 30 Jan 2005

Re: setting environment variables
Randy Kobes 06:26 on 03 Feb 2005

Re: setting environment variables
colin_e 14:28 on 04 Feb 2005

Generated at 08:54 on 14 Mar 2005 by mariachi v0.52