Graham Dumpleton
graham.dumpleton at gmail.com
Tue May 27 16:31:31 EDT 2008
I somewhat doubt PassEnv will help. It would apply only to CGI scripts and not processes created from Python code. Graham 2008/5/28 <elias.collas at gulfstream.com>: > > I don't know about reading all of your environment variables, but you may > define (redefine) the necessary ones in your Apache configuration files > with the PassEnv directive. I'll refer you to the Apache docs for the > details. > > Elias Collas > > > > > "Joseph > Bernhardt" > <joe at incomps.com> To > Sent by: <mod_python at modpython.org> > mod_python-bounce cc > s at modpython.org > Subject > [mod_python] Apache User Profile > 05/27/2008 11:05 > AM > > > > > > > > > This may not have much to do with mod_python, but I suspect that some of > you may have run into the same problem as I have. > > I am using mod_python to execute a script from a remote client via a web > request. For example: > > import subprocess > > def index(req): > subprocess.Popen(['scriptName']) > return "success" > > So that when a request is made to www.mysite.com/startScript it will > execute scriptName on the server. I have many global variables that are > defined within /etc/profile that are required for scriptName to function > properly. When I log into the shell, I can execute scriptName without > error. Unfortunately, when the web request is made and the process is > started under the apache user, the global variables do not exist and the > script fails. > > Does the apache user not recognize /etc/profile? If not, where can I set > these global variables (besides within the script itself)? > > Thanks for any help! > > Joseph Bernhardt > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python > > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python >
|