Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8197567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:46:07+00:00 2026-06-07T05:46:07+00:00

I recently re-installed my Ubuntu PC (to 12.04) & had to re-setup apache. local.domain.com

  • 0

I recently re-installed my Ubuntu PC (to 12.04) & had to re-setup apache.
local.domain.com points to localhost (virtual host).
http://local.domain.com/script.py?query=string
script.py is chmod’d to 755.
In my .htaccess I have :

Options +ExecCGI
AddHandler cgi-script .py

But I get a 500 : Internal Server Error.
cat /var/log/apache2/error.domain.com.log shows nothing.
If I do python script.py in the command line I get :


<!-- The above is a description of an error in a Python program, formatted
     for a Web browser because the 'cgitb' module was enabled.  In case you
     are not reading this in a Web browser, here is the original traceback:

Traceback (most recent call last):
  File "script.py", line 32, in <module>
    queryHash = hashlib.sha224(os.environ['QUERY_STRING']).hexdigest()
  File "/usr/lib/python2.7/UserDict.py", line 23, in __getitem__
    raise KeyError(key)
KeyError: 'QUERY_STRING'

-->

So I don’t figure anything wrong with the py script. It used to work before.
But for some reason its not executing in the browser.
What else could I have missed ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T05:46:09+00:00Added an answer on June 7, 2026 at 5:46 am

    Ubuntu 12.04 has python 2.7. My script’s shebang line was :

    #!/usr/bin/env python2.6
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently installed Ubuntu Jaunty and I'm encountering a problem when I try to
I recently installed Oracle's VirtualBox on Ubuntu, due to the fact that I needed
I recently installed KDevelop 4 for C++ development on my Macbook Pro running Ubuntu
I recently installed Eclipse IDE for Java Developers: Indigo Service Release 2, on Ubuntu
Hi I recently Updated my computer so I've installed Ubuntu 11.10 64-bits. to install
I recently just installed Eclipse onto a Ubuntu 10.04 machine. Now, I'm reading Getting
I have recently upgraded to Ubuntu 10.04 and as usual installed xdebug from the
I've recently installed Ubuntu 11.10 and along with it the CodeBlocks IDE and I
I recently installed Oracle Express Edition 10g on my Ubuntu from apt-get. My problem
I recently installed virtualbox on Windows7 and my guest operating system is Ubuntu 10.04

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.