I tried to run a CGI python file, I am new to html and server side programming. I wanted to a python scrip on my webserver(Wamp) so I searched and found that I could use Apache. I dropped my code in a .py file and put it in the cgi-bin folder. When I run it I get an error, mind that I stole the test code from the python website to test it.
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# enable debugging
import cgitb
cgitb.enable()
print("Content-Type: text/plain;charset=utf-8")
print()
print("Hello World!")
This is the error I get:
[Thu Jul 09 14:11:58.841220 2015] [cgi:error] [pid 9940:tid 968] [client ::1:54621] script not found or unable to stat: C:/wamp/bin/apache/apache2.4.9/cgi-bin/CgiTest.py
[Thu Jul 09 14:26:59.338627 2015] [cgi:error] [pid 5500:tid 968] (OS 2)The system cannot find the file specified. : [client ::1:54733] couldn't create child process: 720002: CgiTest.py
[Thu Jul 09 14:26:59.338627 2015] [cgi:error] [pid 5500:tid 968] (OS 2)The system cannot find the file specified. : [client ::1:54733] AH01223: couldn't spawn child process: C:/wamp/bin/apache/apache2.4.9/cgi-bin/CgiTest.py
I have made sure the name is correct. I get a 500 internal error. I have also made sure I have checked cgi-modules in the wamp server tray icon.