Tobiast Posted January 24, 2012 Posted January 24, 2012 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/pythonprint 'text/plain'printprint '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! Quote
Tobiast Posted January 24, 2012 Author Posted January 24, 2012 Maybe it worth mentioning that I signed up for the Johnny-version. Quote
Tjoene Posted January 24, 2012 Posted January 24, 2012 Try to set the permission of the file to 755. Quote
darksilence Posted January 25, 2012 Posted January 25, 2012 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. Quote
darksilence Posted January 26, 2012 Posted January 26, 2012 My problem solved, actually all i had to do is forgetting sample i found from web and write my own python code with html tags. sorry for my disturbance Quote
Tjoene Posted January 26, 2012 Posted January 26, 2012 Glad your question got answered! Please spare a few minutes to take our brief survey: http://feedback.heliohost.org/ Your participation in this survey is greatly appreciated. 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.