Re: setting environment variables
[prev]
[thread]
[next]
[Date index for 2005/01/30]
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"><orasnita@xxx.xx></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->dir_config->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"><frank@xxxxx.xxx></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)
|