Trouble with Python and PWS

Ulf Engström ulf.engstrom at b2b-link.com
Wed Mar 8 03:18:23 EST 2000


Well, just some thoughts:
Have you associated .cgi to the Python interpreter correctly?
This is done in the regedit, under
HKEY_LOCAL_MACHINE
   System
      CurrentControlSet
         Services
           W3Svc
              Parameters
                Script_Map
where you enter a new string value of .cgi, and enter
"C:\program files\python\python -u %s %s" or whatever your path to Python
is. Since you had the python-thingy in your error, I guess this is correct,
but just to make sure.

Also, have you set execute right in that directory? Sometimes it won't work
if you have both read and execute, which is why you should put your
cgi/python in another dir with only execute permissions.

What does the cgi-file look like?

Hope this helps.
Regards
Ulf

Jon Cosby had some problems:
> I'm having trouble running CGI scripts under Personal Web Server 4.02.
> It's recognizing Python as the interpreter, but Python can't open the
script
> file. The message I'm getting is

> CGI Error

> The specified CGI application misbehaved by not returning a complete set
> of  HTTP headers. The headers it did return are:

> C:\Program Files\Python\python.exe: can't open file
> 'c:\WEBSHARE\WWWROOT\hello.cgi'
>
>
> "hello.cgi" is a simple print hello command, with the header. Is anybody
> familiar with this problem? Anyone have a suggestion?






More information about the Python-list mailing list