Question

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?

Was it helpful?

Solution 2

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/"

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top