1
votes

Im running a website hosted on HelioHost, I'm a 10th grade student, so I can't exactly afford to pay for hosting.

I was trying to run a simple CGI Script written in python on the web server:

#!/usr/bin/env python
print "Content-type: text/html\n\n"
print "<h1>Hello World</h1>"

Unfortunately, I got a 500 Internal Server error at http://fpl.heliohost.org/cgi-bin/lel.py

I tried replacing the shebang line with #!/usr/bin/python, as suggested at http://www.heliohost.org/home/features/languages/python, but I'm still facing the same error.

chmod is 755. Also, I'm able to run this on my PC via Python Command Line, and it works fine on my Apache Web Server on my Raspberry Pi.

Any idea what could be causing the problem?

1
Check what your web server's error log says. Use the time of the request to line up with the relevant error log entry.Alex Reynolds
Unfortunately HelioHost wont let me see the error log :( But I got it working! cgi-bin chmod was 777, I changed it to 755 and it started! But I wonder why it wouldn't work with extra permissions...poiasd

1 Answers

2
votes

I managed to get it working by changing the permissions (chmod) of cgi-bin to 0755 from 0777.

The curious part is, why wasn't it working with 0777? I guess that's for another day......