title: Run Python Script on Web Server
body: <p>I have a web server and my cgi-bin is on 0755, and my script called return.py is also 0755. And when my script is just this</p>
  
  <pre><code>#!/usr/bin/perl
  
  import cgi
  import json
  
  
  print "Content-type: text/plain\n\n";
  print "testing...\n";
  </code></pre>
  
  <p>And I go to the web page I see testing... as I should, but when I add any of this to my script</p>
  
  <pre><code>form = cgi.FieldStorage()
  
  param = form.getvalue("param")
  
  if param:
      json.dumps({'success': True, 'message':  param })
  else:
      json.dumps({'success': False, 'message':  'did not receive parameter' })
  </code></pre>
  
  <p>I get a 500 Internal Server Error, and Im not sure why, I have the correct permissions set, and the python is running because it works when I don't add the stuff above? Is there something wrong with my above code? What else could be causing this issue?</p>
  
  <p>BY THE WAY the above code is because I am making a POST to this and what to return the value posted. Just a simple test case, but I can't get it to work?</p>
  
  <p>Ive gone through this check list, of what I could check, and it all worked <a href="https://encodable.com/internal_server_error/" rel="nofollow">https://encodable.com/internal_server_error/</a></p>
  
  <p>Thanks for the help in advance. :)</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>here are error logs</p>
  
  <pre><code>[Tue Jun 23 01:35:38.661161 2015] [authz_core:error] [pid 874653] [client 173.34------:51484] AH01630: client denied by server configuration: /home/spencer/public_html/.htaccess
  [Tue Jun 23 01:35:38.426745 2015] [access_compat:error] [pid 874653] [client 173.34-----:51484] AH01797: client denied by server configuration: /home/spencer/public_html/error_log
  </code></pre>