I'm new to cgi programming :) I have the following python cgi-scripts, one in python2 and the other in python3. The servers works well with the python2 script but it doesn't run the python3 one. python3.2 is installed on the server.
Here is the python2 script:
#!/usr/bin/env python
print "Content-type: text/html"
print ""
print '''
<html>
<head>
<title>Hello Word - First CGI Program</title>
</head>
<body>
<h2>Hello Word! This is my first CGI program</h2>
</body>
</html>'''
Here is the python3 script
#!/usr/bin/env python3.2
print("Content-type: text/html")
print("")
print('''
<html>
<head>
<title>Hello Word - First CGI Program</title>
</head>
<body>
<h2>Hello Word! This is my first CGI program</h2>
</body>
</html>''')
/var/log/apache2/error.log(if you have access to that). The code should work, check the permissions of the script, and thatpython3.2really is on the default path (cgi scripts don't source~/.profileetc.)