Python Script Not Running

Status
Not open for further replies.

brandon15811

New Member
Messages
9
Reaction score
0
Points
0
I have been trying for the last hour to get a very simple python script running, yet i keep get a 500 internal server error
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
First, search the forums for that error message and the basics of running Python scripts. If that doesn't resolve it, tell us what you've done, including posting the script. It's impossible to diagnose the issue with the amount of information you've given.
 

dlukin

New Member
Messages
427
Reaction score
25
Points
0
Code:
#! /usr/bin/python

print 'Content-Type: text/html'
print ''
print '''<html>
<head>
<title>Python Test</title>
</head>
<body>
<h2>Hello from Monty</h2>
</body>
</html>'''

Note that you have to print a blank line after the 'Content-Type' header
Path works on Lotus.
Chmod script to 0755
To the .htaccess file, add:

Code:
AddHandler cgi-script .py
 

brandon15811

New Member
Messages
9
Reaction score
0
Points
0
Okay, that worked, I swear I set the permissions though, I had set the permissions in ubuntu, but it must've lost them when i transferred the file
 

Zubair

Community Leader
Community Support
Messages
8,766
Reaction score
305
Points
83
Your problem is solved

***Thread Closed***
 
Status
Not open for further replies.
Top