SetEnv not doing what I'd hoped

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

 



I am having a problem get SetEnv to work (at least 
as I think it is supposed to).  I have some python 
cgi scripts that start with:

  #!/usr/bin/env python

I cannot (for logistical reasons) change these scripts.
However, the system python in /usr/bin/ is an old version
that the scripts will not run correctly with.

I installed a new version of python in /opt/python/
and added a SetEnv option to change PATH, putting the 
new python interpreter directory first:

  ScriptAlias /mydir/cgi/ /home/stuart/devel/web/cgi/
  Alias       /mydir/     /home/stuart/devel/web/
  <Directory /home/stuart/devel/web>
    SetEnv PATH /opt/python/bin:/usr/bin:/bin
    ...other stuff...
    </Directory>

I confirmed that the new python is installed ok, runs correctly
when I set my own path as above, etc.  

However, when I put a cgi script that prints its environment
variables in the web directory, and view it with a browser, 
it shows the PATH has not been changed (and the old interpreter 
is executing it.)  The config section above does and has been 
working fine (except the the wrong python is executed.)

Am I doing something wrong?  How can I get this to work?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-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