-----Original Message-----
From: Eric Covener [mailto:[email protected]] 
Sent: Tuesday, June 21, 2011 11:42 PM
To: [email protected]
Subject: Re: [users@httpd] Change $PATH in apache

> We're trying to run trac and svn which include some python scripts.  I'd
> really like to use the python that I've installed in /opt, but it appears
> that apache is using the default python /usr/bin/python.

Using it for what? mod_python, or python scripts that start with
#!/usr/bin/python?

I wouldn't expect either cares about the PATH.
-------------END ----------------


Good point. So it won't care what the PATH variable tells. But command line 
will be working fine. But scripts would fail. So the way out would be to rename 
the /usr/bin/python to something like /usr/bin/python-<it's version number> and 
sym link the /opt/python to this /usr/bin/python. And it should now work fine 
from both cmd line and from scripts. But think twice before you do this. 
Because the OS scripts which rely on the ver. of python in /usr/bin/python and 
if your python in /opt/python is not backward compatible with /usr/bin/python 
then those things will fail. So I think of running sed 
s$usr/bin/python$/opt/python$g on all the files which are related to the trac 
and svn. you can find out trac and svn files via listing files via rpm or dpkg. 
But this sed is a long workaround and YMMV.

HTH

--ashwin

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [email protected]
   "   from the digest: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to