Hi !

I would need some environment variables set for database access in PHP
on my Apache server. I cannot seem to nail down the problem. Here's a
description:

The variables are neede for
a) Informix - to connect to the server (INFORMIXDIR, INFORMIXSERVER)
b) freetds - to set up the right version of SQL SERVER

The variables are currently set in various places, but do not seem to
work anywhere:

In my modified version of /etc/init.d/apache . In Debian, this version
stops "polluting" apache with environment variables, so I put a
comment in front of this line :
$APACHECTL = "env -i $.... $APACHECTL"

In /etc/profile, which someone told me is only sourced by interactive
shells. This means apparently that it doesn't get run when I reboot
the machine.

In httpd.conf, global section with SetEnv. mod_env is on and I can see
them with mod_info.

However, none of these methods work. The only method that works is
logging in as root and

INFORMIXDIR=/opt/informix
export INFORMIXDIR
/etc/init.d/apache restart

I think I lack some knowlegde about the startup process, but I also
tried to run a shell script that sets them in /etc/rc2.d and
/etc/rc3.d . When I log in they are not set after a reboot.

So my questions are: Do I need them outside apache? I think so,
because it doesn't go with SetEnv. How do I set environment variables
for my whole system on Debian? I know /etc/profile.local on SuSE, but
that obviously doesn't work on Debian.

Thanks for any help, pointers etc.

Jochen







Jochen Daum

Web Architect/Database Developer
CANS Ltd.
5 Heb Pl
Takanini, Auckland
(09) 279 5777 [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to