Skip to content Skip to sidebar Skip to footer

When Try To Execute A Cgi Script, Get The Error: "[winerror 193] %1 Is Not A Valid Win32 Application"

When I try to execute a cgi script (via a localhost), I get the following error OSError: [WinError 193] %1 is not a valid Win32 application Any ideas why ?? Completely lost... .

Solution 1:

So turns out it was a server config error....

I came across this tutorial,

http://anh.cs.luc.edu/python/hands-on/3.1/handsonHtml/dynamic.html

which references a localCGIServer.py script available here,

http://anh.cs.luc.edu/python/hands-on/examples/www/localCGIServer.py

And the server script gets the job done

*

For Python 3 change this line

cgiServer = BaseHTTPServer.HTTPServer(server_addr, CGIExtHTTPRequestHandler)

to

cgiServer = http.server.HTTPServer(server_addr, CGIExtHTTPRequestHandler)

Post a Comment for "When Try To Execute A Cgi Script, Get The Error: "[winerror 193] %1 Is Not A Valid Win32 Application""