CGIHTTPServer and Win2k

Tim Roberts timr at probo.com
Thu Nov 15 23:02:07 EST 2001


"Andrew Post" <apost at cbmi.upmc.edu> wrote:
>
>from BaseHTTPServer import HTTPServer
>from CGIHTTPServer import CGIHTTPRequestHandler
>import os
>
>print "Starting Python Web Server..."
>port = 80
>os.chdir('C:/Documents and Settings/apost/Desktop/Python Web Server')
>servr = HTTPServer(('', port), CGIHTTPRequestHandler)
>servr.serve_forever()
>
>The server output follows:
>
>APOST2 - - [14/Nov/2001 20:55:42] "GET /ccl.html HTTP/1.1" 200 -
>APOST2 - - [14/Nov/2001 20:55:49] "GET
>/cgi-bin/creat_calc.py?age=70&weight=70&s
>Cr=1.7 HTTP/1.1" 200 -
>APOST2 - - [14/Nov/2001 20:55:49] command: C:\Python21\python.exe
>C:\Documents a
>nd Settings\apost\Desktop\Python Web Server\cgi-bin\creat_calc.py
>APOST2 - - [14/Nov/2001 20:55:49] CGI script exit status 0x2

Exit status 0x2 is "file not found".

You have a permissions problem.  On Windows 2000, the user profile
directories in "Documents and Settings" are readable only by the owner.

You should either place these in "Documents and Settings\All Users", or in
some other public directory.
--
- Tim Roberts, timr at probo.com
  Providenza & Boekelheide, Inc.



More information about the Python-list mailing list