From: Michael Powe on
Hello,

Trying to install python as CGI on IIS 6, Win2k3 Standard, 64-bit. I
followed the articles here:

http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/bc0c4729-e892-4871-b8f3-fcbf489f2f09.mspx?mfr=true

No joy. All I am getting is a 404. This doesn't even generate any errors
to indicate what might be the problem. The script itself is copied from an
older MS article on installing python as a CGI scripting engine. No syntax
errors, I ran it from the command line.

I added the mapping thus:

c:\Python26\python.exe -u "%s %s"
to extension `py' for all verbs and checked the `script engine' box.

I enabled ASP and tried putting an ASP page in the cgi virtual directory,
with python set as the scripting language. This page is accessible but
displays this error:

Active Server Pages error 'ASP 0129'
Unknown scripting language
/cgi/index.asp, line 1
The scripting language 'Python' is not found on the server.

I added IWAM and IUSR as users to the python exe directory and they're
already on the cgi directory.

Any suggestions as to how I can get this cgi implementation to work? Much
appreciated.

Thanks.

mp


--
"Mutable stateful objects is the new spaghetti code." - Rich Hickey
From: Marvin Landman on
Hi,

CGI and ASP are two different things.

As you said you have mapped .py extension to Python. You should use .py
files rather than ASP.

If you on the other hand would like to use Python inside ASP you should
install a Python ActiveScript engine.

I think you need ActivePython for that:
http://docs.activestate.com/activepython/2.4/pywin32/ASP_and_Python.html

Marvin

Michael Powe wrote:
> Hello,
>
> Trying to install python as CGI on IIS 6, Win2k3 Standard, 64-bit. I
> followed the articles here:
>
> http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/bc0c4729-e892-4871-b8f3-fcbf489f2f09.mspx?mfr=true
>
> No joy. All I am getting is a 404. This doesn't even generate any errors
> to indicate what might be the problem. The script itself is copied from an
> older MS article on installing python as a CGI scripting engine. No syntax
> errors, I ran it from the command line.
>
> I added the mapping thus:
>
> c:\Python26\python.exe -u "%s %s"
> to extension `py' for all verbs and checked the `script engine' box.
>
> I enabled ASP and tried putting an ASP page in the cgi virtual directory,
> with python set as the scripting language. This page is accessible but
> displays this error:
>
> Active Server Pages error 'ASP 0129'
> Unknown scripting language
> /cgi/index.asp, line 1
> The scripting language 'Python' is not found on the server.
>
> I added IWAM and IUSR as users to the python exe directory and they're
> already on the cgi directory.
>
> Any suggestions as to how I can get this cgi implementation to work? Much
> appreciated.
>
> Thanks.
>
> mp
>
>

From: Michael Powe on

--
"Mutable stateful objects is the new spaghetti code." - Rich Hickey


"Marvin Landman" wrote:

> Hi,
>
> CGI and ASP are two different things.
>
> As you said you have mapped .py extension to Python. You should use .py
> files rather than ASP.

Hello,

Thanks for the reply. Yes, I understand that cgi and ASP are separate
entities. I used the 'test.py' code from the MS knowledgebase to test my CGI
implementation. It 404's. I then went back and enabled ASP and tried the
<%@language=python%> option.

I am setting up a development environment for connecting to a web service.
My preference would be the CGI/py but ASP with py scripting would work.

I get what you're saying about ActiveState. I was trying to avoid it, as it
does a lot more than just install python.

I may have to bite the bullet, but I really would like to know what is
causing the python setup to not work, as I'm quite certain I followed the MS
instructions to the letter.

Thanks.

mp

From: Marvin Landman on
Try this one as well:
http://support.microsoft.com/kb/276494

Ensure that python.exe and the .py script has correct permissions.

You also may need to set Home Directory\Execute Permissions to "Scripts
and Executables"

Also try python.exe without %s %s if it still does not work.

Marving
 | 
Pages: 1
Prev: test
Next: understanding Mobile Devices