Jump to content

Problem Executing A Python/cgi Script


Recommended Posts

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">


<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>



Pretty much I just execute my 'script.py' when you click the submit button.


And this is the code for my python script:






print "Content-type: text/html"


print "<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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...