Jump to content

Recommended Posts

Posted

I'am trying to run a Python cgi-script. In the first place I've tried running a bit complex python script, but it did not work properly, in fact the script didn't run at all. So the next step was to write a simple HelloWorld script like this one:

#!/usr/bin/python

print 'text/plain'

print

print 'Hello World!'

 

Just to test if this script could run. But no, it didn't. I got an internal server error. Do I need to install something on the webserver to get the script to run? Any solutions?

 

BTW: I saved the script in the Cgi-bin folder, and tried to run it by connecting to the adress. Typically www.yourhostname.helios.org/cgi-bin/script.cgi

 

Thanks in advance! :)

Posted

I couldn't work my python code either, i saved my code with .py and .cgi separetely and tried to place both in public_html and cgi-bin folders. Tried to reach both username.heliohost.org and username.heliohost.org/cgi-bin/script.cgi from my browser (also named index.cgi, index.py etc.) I have used simple samples from some cgi learning sites and the tobiast's example as well with no success at all. And i set permissions to 755 with sudo chmod command properly.

 

I hope you can help me.

 

By the way it is my first cgi programming experience at all, and fairly new in python (although i have writting some simple codes for some months in my computer, i have no web experience before) I have used some other languages before but right now my goal is to improve my python and database design.

 

Thanks in advance Kaan.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...