Yosuke Posted January 23, 2015 Posted January 23, 2015 So I'm new to HelioHost and created a domain not long ago. I uploaded my own web page in a html file which works perfectly, but I also want to be able to execute a python script with cgi from it. I tried executing my Python script from the html page in my own local server and it works fine, but when I upload both the html and my python script (the latest on the cgi-bin folder) it doesn't work. The code in the html is the next :<form action="/cgi-bin/script.py" method"GET"><fieldset><br>First seiyuu:<br><input type="text" name="name"><br>Second seiyuu:<br><input type="text" name="name"><br><input type="submit" value="Submit"><br></fieldset></form>Pretty much I just execute my 'script.py' when you click the submit button. And this is the code for my python script: script.py #!/usr/local/bin/python print "Content-type: text/html"printprint "<html>"print '<body>'print '<p> Hello World</p>'print "</body>"print "</html>" When I click the submit button on my html page, I just get an Error 500. My index.html and all the files in the cgi-bin (including the folder itself) have the permissions set to 755 (All can be full executable). Does anyone have any idea on what might be causing the error?Thanks in advance Quote
yashrs Posted January 24, 2015 Posted January 24, 2015 Use this:-#!/usr/bin/python print "Content-type: text/html" print "" print "<html>" print "<body>" print "<p> Hello World</p>" print "</body>" print "</html>" Quote
Yosuke Posted January 24, 2015 Author Posted January 24, 2015 That works, I can't beleive I messed up like that, thanks a bunch! 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.