Gentoo Archives: gentoo-user

From: "hinko.kocevar@×××××××××.si" <hinko.kocevar@×××××××××.si>
To: gentoo-user@l.g.o
Subject: [gentoo-user] add shell enviroment variable to apache2 process
Date: Tue, 29 Jan 2008 13:27:24
Message-Id: 479F2999.4000107@cetrtapot.si
1 Hi,
2
3 I would like to 'pass' shell environment variable to apache2. Looking at
4 the /etc/init.d/apache2 I've noticed, that env vars are cleared with
5 'clear_env_except'.
6 I've tried to add the variable to the /etc/conf.d/apache2 KEEPENV
7 directive but it didn't help.
8
9 I also tried to add line 'NLS_LANG' to the /etc/conf.d/env_whitelist but
10 with no avail.
11
12 Another try was to add the variable to
13 /etc/env.d/50oracle-instantclient-basic and run env-update and the
14 restart the apache2 server, with no luck...
15
16 I also put the 'NLS_LANG' export in the /etc/profile and it didn't work.
17
18 Eg.:
19 In shell I export:
20 export NLS_LANG=American_America.UTF8
21 /etc/init.d/apache2 start
22
23 Using this simple PHP script I can see what is set:
24 test.php:
25 <?php
26 echo "<pre>";
27 system("set");
28 echo "</pre>";
29 ?>
30
31 I need NLS_LANG to be listed here but it is missing.
32 If I start the apache2 from the command line (without using the
33 /etc/init.d/apache2) the NLS_LANG is printed by the test.php script.
34
35 What am I doing wrong?
36
37 Best regards,
38 Hinko
39
40 --
41 ČETRTA POT, d.o.o., Kranj
42 Planina 3
43 4000 Kranj
44 Slovenia, Europe
45 Tel. +386 (0) 4 280 66 03
46 E-mail: hinko.kocevar@×××××××××.si
47 Http: www.cetrtapot.si
48
49 --
50 gentoo-user@l.g.o mailing list