Hi, I got problem on installing OSQA on Dreamhost. I followed the guide at http://wiki.osqa.net/display/docs/Installing+OSQA+on+DreamHost and got "An error occurred importing your passenger_wsgi.py" when entering the website domain. Then I changed the passenger__wsgi.py to

import sys,os
INTERP = "/home/<username>/local/bin/python"
if sys.executable != INTERP: os.execl(INTERP, INTERP, *sys.argv)
sys.path.append("/home/sgk/hoi-dap.info/")
sys.path.append("/home/sgk/hoi-dap.info/osqa")
os.environ['DJANGO_SETTINGS_MODULE'] = 'osqa.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

as suggested and got 404 not found.

any idea for this problem?

asked 15 Jun '11, 01:14

Kenny's gravatar image

Kenny
31114
accept rate: 0%

@Kenny, we require all postings at meta.osqa.net to have a clear, specific QUESTION in the title field. Please edit this right away to rephrase the title as a proper question.

(04 Jul '11, 09:52) rickross ♦♦

By the way, @subrat was trying to get OSQA working on Dreamhost (see their profile for their questions on this topic): as far as I can tell, they've now switched to webfaction.

Anyway, on this problem on Dreamhost:

Remember, every time you've changed some *.py files, you may need to restart the server process, to get it to recognise the new files.

If you're still having trouble after that, go into your server on a SSH. Open a python console, by executing:

/home/sgk/local/bin/python

If that doesn't work, then that's your problem - it can't see your python installation. Try:

which python

to find out where your python is. You'll probably need a local version of python, to enable you to install all the python libraries you need. Once you've confirmed all that, get the right python path into your passenger_wsgi.py file.

Once you've got a python window open, type in each of the lines from your passenger_wsgi.py file into the python window one by one, and execute each in turn, to see where it's choking.

link

answered 15 Jun '11, 04:53

Andrew_S's gravatar image

Andrew_S ♦
5.6k45674
accept rate: 21%

edited 15 Jun '11, 04:59

I checked and see that python still in the path /home/sgk/local/bin/python. When I execute the line if sys.executable != INTERP: os.execl(INTERP, INTERP, *sys.argv) it shows me the "..." and freeze there. Is that the problem?

(15 Jun '11, 05:07) Kenny

I just wonder is it correct that after install there are 'osqa', 'public' folder and passenger_wsgi.py in 'hoi-dap.info' folder on the server?

(15 Jun '11, 05:40) Kenny

re the line it's halting: just leave that line out.

(15 Jun '11, 09:00) Andrew_S ♦

I now have the same problem after upgrading from an earlier version. Did you eventually get this fixed?

(02 Jul '11, 18:54) Mark Phipps

this:

INTERP = "/home/<username>/local/bin/python"

should probably be something like this:

INTERP = "/home/sgk/local/bin/python"

or

INTERP = "/home/sgk/hoi-dap.info/local/bin/python"

Assuming that your username is sgk and your osqa installation is in /home/sgk/hoi-dap.info/osqa

link

answered 15 Jun '11, 04:08

Andrew_S's gravatar image

Andrew_S ♦
5.6k45674
accept rate: 21%

Just changed that name but still 404 not found. I also re-install everything but still the same result.

(15 Jun '11, 04:16) Kenny

Download python 2.6 and use that instead of dreamhosts. That's how I fixed this.

link

answered 04 Jul '11, 12:18

pisoj's gravatar image

pisoj
1063511
accept rate: 0%

In the end, I installed 2.7 and it worked after I disabled passenger on Dreamhost, added a .htaccess file and changed the passenger file to a fcgi.

(04 Jul '11, 16:42) Mark Phipps
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×298
×156
×12
×1

Asked: 15 Jun '11, 01:14

Seen: 632 times

Last updated: 04 Jul '11, 16:47

powered by OSQA