dmfernan Posted March 17, 2015 Posted March 17, 2015 I got a "500 Internal Server Error" message when I try to call a simple Python script on a Jonhy's Heliohost account. My user is "dmfernan". The address for the script is http://fe.heliohost.org/cgi-bin/holamundo.py The content of the script is:#!/usr/bin/pythonprint "Content-type: text/html"print ""print "<html>"print "<body>"print "<p> Hola mundo desde Python</p>"print "</body>"print "</html>" The permissions for "holamundo.py" is set to 755. I don't know where's the source of the error. The script is so simple. I think that the error is the shebang line, but I read in this forum that the "/usr/bin/python" is the correct. Thanx in advance. Darío.
yashrs Posted March 17, 2015 Posted March 17, 2015 You are missing new line after Content-type. http://yashrs.heliohost.org/python/hello.py#!/usr/bin/pythonprint("Content-Type: text/html\n\n");print("Hello");
dmfernan Posted March 19, 2015 Author Posted March 19, 2015 You're great yashrs. I've modified the Python script to add "\n\n" at the end of the content-type line and ¡it works! Very thanx. 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now