cgi question! problem with correct python version

Chris Gonnerman chris.gonnerman at newcenturycomputers.net
Sun Dec 2 09:56:46 EST 2001


----- Original Message -----
From: "Markus Jais" <info at mjais.de>


> hello
> I am using RedHat 7.1 and I have installed the old python 1.5.2 which
seems
> to be needed by RedHat 7.1 and also the Python 2.1
>
> now I have a strange problem.
>
> 1st script:
> ----
> #!/usr/bin/env python

Here is your confusion... /usr/bin/env looks for a program in the PATH.
Your PATH variable is different than the webservers.

< hack hack >
> #!/usr/local/bin/python
>
> then I get verison 2.1

That's what you should be doing in your case.

> can anybody tell me, why the apache is using the old version??
> is there something wrong with the environment of apache???

No, /usr/local/bin is just not in Apache's PATH, likely for security
reasons.






More information about the Python-list mailing list