jmather Posted November 24, 2007 Posted November 24, 2007 I followed the directions to run python scripts on this forum and i have a question that maybe someone can answer. I uploaded a file like this: >#!/usr/bin/python print 'Content-type: text/html' print print 'This is a test' print 'This is a 2nd test' Set my permissions and it runs fine. But if I upload a file that has this, it does not work (500 Internal Server Error): >#!/usr/bin/python print 'Content-type: text/html' print print 'This is a test' print 'This is a 2nd test' def main() print 'This is another test' main() Notice the tab and function? am I missing something? Thanks...perplexed Quote
jmather Posted November 24, 2007 Author Posted November 24, 2007 Sorry, I'm being *#$# #$#$#... It was the def main() needed to be: def main(): I have been being tortured with too much vb6....please forgive. - JM Quote
TCH-Dick Posted November 24, 2007 Posted November 24, 2007 Glad you were able to sort it out, I know I have that problem all the time. It took me forever the other day to realize that I had some how used (s) instead of ($) in front of a php variable. Really not sure how I got crossed eyed enough to do that, since they are no where near each other on the KB. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.