how-to apache 2.2 mod_fcgid set python path
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 开发者_JAVA百科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?
not quite sure if this help. http://httpd.apache.org/docs/2.0/env.html
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/"
精彩评论