[mod_python] Apache User Profile

Joseph Bernhardt joe at incomps.com
Tue May 27 11:05:55 EDT 2008


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 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20080527/9d25bdc2/attachment.html


More information about the Mod_python mailing list