Jump to content

Recommended Posts

Posted

Hi,

 

I've coded up a simple picture blog to familarize myself with Django and I wanted to deploy it on HelioHost.

 

I'm running on Johnny with username "aspring".

 

The error I can see is:

[Fri Aug 03 16:40:45 2012] [error] [client 72.2.175.249] mod_wsgi (pid=16450): Exception occurred processing WSGI script '/home/aspring/public_html/PictureBlog/dispatch.wsgi'.
[Fri Aug 03 16:40:45 2012] [error] [client 72.2.175.249] mod_wsgi (pid=16450, process='', application='aspring.heliohost.org|/pictureblog/dispatch.wsgi'): Failed to parse WSGI script file '/home/aspring/public_html/PictureBlog/dispatch.wsgi'.

 

NEW ERROR(old one stopped showing up, new one is more specific):

[Fri Aug 03 22:38:01 2012] [error] [client 72.2.175.249] File does not exist: /home/aspring/public_html/500.shtml
[Fri Aug 03 22:38:01 2012] [error] [client 72.2.175.249]   File "/home/aspring/public_html/PictureBlog/dispatch.wsgi", line 15, in application
[Fri Aug 03 22:38:01 2012] [error] [client 72.2.175.249] mod_wsgi (pid=7057): Exception occurred processing WSGI script '/home/aspring/public_html/PictureBlog/dispatch.wsgi'.

 

My wsgi script located at /home/aspring/public_html/PictureBlog/dispatch.wsgi:

import os, sys
sys.path.append("/home/aspring/public_html/PictureBlog");

### EDIT LINE ABOVE TO YOUR SITE ###

os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
os.environ['PYTHON_EGG_CACHE'] = '/home/aspring/.python_egg_cache'

### YOU NEED TO CREATE THE DIRECTORY ABOVE ###

import django.core.handlers.wsgi
_application = django.core.handlers.wsgi.WSGIHandler()
def application(environ, start_response):
environ['PATH_INFO'] = environ['SCRIPT_NAME'] + environ['PATH_INFO']
return _application(environ, start_response)

 

My .htaccess located at /home/aspring/public_html/PictureBlog/.htaccess:

RewriteEngine On
RewriteBase /
RewriteRule ^(media/.*)$ - [L]
RewriteRule ^(admin_media/.*)$ - [L]
RewriteRule ^(dispatch\.wsgi/.*)$ - [L]
RewriteRule ^(.*)$ PictureBlog/dispatch.wsgi/$1 [QSA,PT,L]

 

 

Both of these have proper permissions set, same with my /home/aspring/.python_egg_cache

I have checked that a billion times.

 

SOLVED: Please Close

The solution was a difference in versions between the latest django and what is actually hosted on johnny. johnny uses 1.3.1 if I recall correctly and django release is currently 1.4

I directly transferred my project in through ftp. The problem with this is that the settings.py file from 1.4 contains some things that 1.3.1 does not support and won't recognize. Thus I compared the djangotest settings.py file with mine and eliminated the logging and some other settings so that mine would work.

Now I'm onto the issues of why it won't read my sqlite3 db. Fun stuff!

 

 

Thanks so much for what you guys do. I really appreciate it.

 

Aaron

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...