The file is on Ubuntu Server 12.04 and not sure how to set the executable bits? <div><br></div><div>If you mean chmod +x <filename></div><div><br></div><div>then yes it has been set.<br><br><div class="gmail_quote">On Fri, Aug 10, 2012 at 12:10 PM, Tim Chase <span dir="ltr"><<a href="mailto:python.list@tim.thechases.com" target="_blank">python.list@tim.thechases.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 08/10/12 13:38, Dave Angel wrote:<br>
> On 08/10/2012 01:14 PM, Smaran Harihar wrote:<br>
>> Hi,<br>
>><br>
>> I have set executable permissions for my py script (cgi-script) but for<br>
>> some reason rather than executing it, the browser simply downloads the py<br>
>> script.<br>
>><br>
>> Here is the link<<a href="http://128.196.142.94/geo/iplantgeo_cgi.py?get=env&from=latlon&lat=42,45,54&lon=-123,-65,-100" target="_blank">http://128.196.142.94/geo/iplantgeo_cgi.py?get=env&from=latlon&lat=42,45,54&lon=-123,-65,-100</a>>.<br>
>> Before it was working on another server. I migrated it to this new domain<br>
>> and it is having this issue. Where am I going wrong?<br>
>><br>
>><br>
> Lots of possibilities, though I can't think of any relating to Python.<br>
> So I didn't try to read your source file.<br>
><br>
> Is the location of this script acceptable to your web host? Some hosts<br>
> deliberately restrict scripts to be in certain places (like /cgi-bin) in<br>
> order to thwart a certain type of cracker.<br>
><br>
> Next question, is the python installation actually at the place where<br>
> your shebang points?<br>
<br>
</div></div>And, if the file is on a *nix-like machine (Linux, BSD, Mac,<br>
Solaris, etc), have the executable bits been set?<br>
<br>
-tkc<br>
<br>
<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Thanks & Regards<div>Smaran Harihar</div><br>
</div>