Project

General

Profile

can't get a python cgi on Windows XP to work

Added by w2g almost 16 years ago

I'm using current WLMP's LightTPD, ver. 1.4.22.1
The client is Firefox 3.0.8

The config:

server.modules = ( "mod_access", "mod_accesslog", "mod_alias", "mod_cgi", "mod_ssi", "mod_status" )
server.document-root        = "htdocs/" 
static-file.exclude-extensions = ( ".php", ".pl", ".cgi", ".py" )
server.port                = 8888
dir-listing.activate        = "enable" 
debug.log-request-header   = "enable" 
debug.log-response-header  = "enable" 
debug.log-request-handling = "enable" 
debug.log-file-not-found   = "enable" 
cgi.assign = ( ".py" => "C:/Programmi/devel/Python25/python.exe",
               ".php" => "c:/php/php-cgi.exe",
               ".pl" => "C:/Programmi/devel/msys/1.0/bin/perl5.6.1.exe" )

The cgi:

#!c:/programmi/devel/python25/python.exe
print 'Content-type: text/html\n\n'
print '<H1>Hullo, Lighty!</H1>'

What happens:
first response is a "500 - Internal Server Error"
for subsequent requests, I get a "200 OK" and it prompts me for the download of the file.

N.B., the same cgi is working using a custom CGIHTTPServer testing server, so
I suppose ther's nothing wrong with the file itself.

What's happening then?

Thank you


Replies (1)

RE: can't get a python cgi on Windows XP to work - Added by w2g almost 16 years ago

w2g wrote:

I'm using current WLMP's LightTPD, ver. 1.4.22.1
The client is Firefox 3.0.8

The config:
[...]

The cgi:
[...]

What happens:
first response is a "500 - Internal Server Error"
for subsequent requests, I get a "200 OK" and it prompts me for the download of the file.

N.B., the same cgi is working using a custom CGIHTTPServer testing server, so
I suppose ther's nothing wrong with the file itself.

What's happening then?

Thank you

I've tried the packaged version at
http://www.kevindustries.com/media/kw/files/windows/lighttpd/lighttpd-1.4.11-win-setup.exe
and it works. Who knows... Any ideas?

    (1-1/1)