dmfernan Posted March 17, 2015 Share 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. Quote Link to comment Share on other sites More sharing options...
yashrs Posted March 17, 2015 Share 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"); Quote Link to comment Share on other sites More sharing options...
dmfernan Posted March 19, 2015 Author Share 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 Quote Link to comment Share on other sites More sharing options...
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.