|
Hi, I've problem, as advised on this site I ordered hosting @site5. I followed the documentation word by word and am fairly sure I did everything. But when I visit my site, I'm greeted with an internal server error 500 message. I tried to look into log files, and it seems that .htaccess is causing the problem. First time, I used default .htaccess and osqa.fcgi code as described in the how to. And I got error:
But after I saw error, I searched here and found some type of fix, so I changed both files to: .htaccess
And osqa.fcgi
New error is related to .htaccess file
Any help appreciated, thanks!
showing 5 of 9
show 4 more comments
|
|
Ok, I'm tracing back the steps I took. And I see this error when I try to run command: python2.6 virtualenv-1.4.9/virtualenv.py $HOME/local
p.s. python 2.6, django 1.1.1 |
I reverted back to .htaccess and fcgi file as seen in the how to.
Now I get this error:
[Tue May 31 07:54:01 2011] [warn] [client 66.249.71.185] mod_fcgid: stderr: File "/home/photog/osqa/forum/models/base.py", line 168, in iterator
[Tue May 31 07:54:01 2011] [warn] [client 66.249.71.185] mod_fcgid: stderr: File "/home/photog/osqa/forum/badges/base.py", line 12, in <module>
[Tue May 31 07:54:01 2011] [warn] [client 66.249.71.185] mod_fcgid: stderr: File "/home/photog/osqa/forum/badges/init.py", line 5, in <module>
[Tue May 31 07:54:01 2011] [warn] [client 66.249.71.185] mod_fcgid: stderr: File "/home/photog/osqa/forum/views/meta.py", line 17, in <module>
[Tue May 31 07:54:01 2011] [warn] [client 66.249.71.185] mod_fcgid: stderr: File "/home/photog/osqa/forum/views/init.py", line 5, in <module>
That project_dir line on line 4 of osqa.wsgi - does it actually say "[USERNAME]" in the middle, or have you substituted your username in there? e.g. if your username is sandro, does it now say:
:) that would be a fun oversight, but no I put my username there... /home/photog/osqa
Oh, it's easily done - I've done it myself.
Can you SSH into the server, open a Python shell, and try executing the lines in osqa.fcgi one by one? See if that gives us any clues.
What versions of Python and of Django do you have?
My knowledge of python is limited.
One thing that came to my mind when looking over the how to file. Is that I skipped this part: .bashrc
export PATH=$HOME/local/bin:$PATH
.bash_profile
if [ -f ~/.bashrc ]; then source ~/.bashrc fi
Mainly due to wording used in the guide. Which was "You may want to create .bashrc and/or .bash_profile files like the following (or add these lines to your existing files)"
So I thought this wasn't necessary? could problem be related to this??
I don't have access to SSH right now, Im at work and we are jailed here... will try when I get home!
Python 2.6.1 (python -v) django I don't know how to check...
How do I execute osqa.fcgi? any hints?
On my site, start page: Unhandled Exception An unhandled exception was thrown by the application.
right, first you start a python shell: python
Have osqa.fcgi visible in a file viewer elsewhere on your screen. Now enter each line from that, one at a time (starting at the top), into the python shell, and press enter after each line, until you get an error.
ok, for this line: PROJECT_DIR = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(file))), 'osqa')
I get: Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'file' is not defined
and than: sys.path.insert(0, _PROJECT_DIR)
Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name '_PROJECT_DIR' is not defined
I give up. This is not going anywhere... :(