RE: Change $PATH in apache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux