views:

379

answers:

2

Hello, i have trouble with seting the python path or any other enviroment variable for mod_fcgid (solaris 10, glassfish apache 2.2)

I have it set in apache, but nothing in os.environ in the fcgi script:

SetEnv PYTHONPATH "/opt/uusis/lib/python2.4/site-packages/:/usr/lib/python2.4/"

And other stuff(for example ORACLE_HOME) and I need to access them in the fcgi script. I know i can use this to set the python path.

sys.path.insert(0, "/opt/uusis/lib/python2.4/site-packages")
sys.path.insert(1, "/usr/lib/python2.4/")

Is there a way to pass the enviroment values from apache?

A: 

not quite sure if this help. http://httpd.apache.org/docs/2.0/env.html

Dyno Fu
See the answer i gave, the apache manual is useless.
mardicas
A: 

I found out that Solaris 10 glassfish apache 2.2 mod_fcgid has "DefaultInitEnv"

This is not documented in the apache mod_fcgid ...

Example:

DefaultInitEnv PYTHONPATH "/opt/something/lib/python2.4/site-packages/:/usr/lib/python2.4/"
mardicas