title: The server encountered an internal error and was unable to complete your request
body: <p>I am a newbie to the python. I was trying with a simple python script and HTML as given below code:</p>
  
  <p>html code- ex1.html</p>
  
  <pre><code>&lt;!doctype html&gt;  
  &lt;html&gt;  
  &lt;head&gt;  
  &lt;title&gt;demo web file python3.2&lt;/title&gt;  
  &lt;/head&gt;  
  &lt;body&gt;  
  &lt;form name="pyform" method="POST" action="/cgi-bin/form.py"&gt;  
    &lt;input type="text" name="fname" /&gt;  
    &lt;input type="submit" name="submit" value="Submit" /&gt;  
  &lt;/form&gt;  
  &lt;/body&gt;  
  &lt;/html&gt;  
  </code></pre>
  
  <p>And Python script-form.py</p>
  
  <pre><code>#!"C:\python34\python.exe"
  print("Content-Type: text/html")      
  print()                               
  
  import cgi,cgitb  
  cgitb.enable() #for debugging  
  form = cgi.FieldStorage()  
  name = form.getvalue('fname')  
  print("Name of the user is:",name) 
  </code></pre>
  
  <p>and executed in local host as 
  <a href="http://localhost/cgi-bin/ex1.html" rel="nofollow">http://localhost/cgi-bin/ex1.html</a></p>
  
  <p>giving error as </p>
  
  <blockquote>
    <p>Server error!</p>
    
    <p>The server encountered an internal error and was unable to complete
    your request. Either the server is overloaded or there was an error in
    a CGI script.</p>
    
    <p>If you think this is a server error, please contact the webmaster.</p>
    
    <p>Error 500</p>
    
    <p>localhost Apache/2.4.2 (Win32) OpenSSL/1.0.1c PHP/5.4.4</p>
  </blockquote>