httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashwin Kesavan <ashwi...@yahoo-inc.com>
Subject RE: [users@httpd] Change $PATH in apache
Date Wed, 22 Jun 2011 06:27:42 GMT


-----Original Message-----
From: Eric Covener [mailto:covener@gmail.com] 
Sent: Tuesday, June 21, 2011 11:42 PM
To: users@httpd.apache.org
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: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message