Re: Strange error, trying to deploy Django with mod_wsgi

2007-12-11 Thread Graham Dumpleton

On Dec 12, 3:18 pm, Michael Best <[EMAIL PROTECTED]> wrote:
> yml wrote:
> > Hello Steve,
>
> > Sometimes ago when I first try to use mod_wsgi I have written a wiki
> > page there:
> >*http://code.djangoproject.com/wiki/django_apache_and_mod_wsgi
> > It is a step by step procedure that I have followed to configure
> > mod_wsgi. It might help you to get your application up and running
> > with mod_wsgi.
>
> > Good luck
>
> I've tried my best to get this working on Linux (Centos 5), but I find
> that my Apache vhost just hangs and never returns any pages.
>
> Any tips would be great.

Probably better to go to:

  http://groups.google.com/group/modwsgi

and post question there as sounds more specific to mod_wsgi than
Django.

Ensure that you have first tried simple hello world example from
mod_wsgi configuration guidelines:

  http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines

If using daemon mode, run same example in daemon mode as well to make
sure that works before even attempting to set up Django.

Also look at:

  http://code.google.com/p/modwsgi/wiki/InstallationIssues
  http://code.google.com/p/modwsgi/wiki/ApplicationIssues

Especially take note of shared library conflicts described in that
document.

Make sure you have set Apache LogLevel directive to 'debug' to capture
as much log output as possible so you can provide information when
requested.

The official mod_wsgi/Django documentation is actually at:

  http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango

Even then, there can be more to it than that depending on how you are
trying to set it up.

In going to other list, make sure you provide as much information as
possible, such as mod_wsgi version, Apache configuration for setting
up mod_wsgi that you used, relevant messages from Apache error log
from time of restart up to and including the request you made.

Graham
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Strange error, trying to deploy Django with mod_wsgi

2007-12-11 Thread Michael Best

yml wrote:
> Hello Steve,
> 
> Sometimes ago when I first try to use mod_wsgi I have written a wiki
> page there:
>* http://code.djangoproject.com/wiki/django_apache_and_mod_wsgi
> It is a step by step procedure that I have followed to configure
> mod_wsgi. It might help you to get your application up and running
> with mod_wsgi.
> 
> Good luck

I've tried my best to get this working on Linux (Centos 5), but I find
that my Apache vhost just hangs and never returns any pages.

Any tips would be great.

-Mike


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Strange error, trying to deploy Django with mod_wsgi

2007-09-25 Thread Steve Potter



On Sep 25, 8:27 pm, Graham Dumpleton <[EMAIL PROTECTED]>
wrote:
> On Sep 26, 3:59 am, Steve  Potter <[EMAIL PROTECTED]> wrote:
>
>
>
> > > This sort of odd error can sometimes come up if you have chosen names
> > > for directories/modules which clash with standard Python module names.
>
> > > Where you have in your WSGI script file for mod_wsgi something like:
>
> > > sys.path.append('/usr/local/django')
> > > sys.path.append('/usr/local/django/mysite')
>
> > > change it to:
>
> > > sys.path.insert(0, '/usr/local/django')
> > > sys.path.insert(0, '/usr/local/django/mysite')
>
> > > This will ensure that your site directories are first in the path
> > > before any of the standard Python modules directory and if you have
> > > used a name which is the same as some standard module, your module
> > > will take precedence.
>
> > > Other than that, would need to see the full error and traceback and if
> > > related to something in urls.py, show the contents of your rules as
> > > well so can see what target modules/properties are.
>
> > > Graham
>
> > Graham,
>
> > I tried changing the paths as you mentioned above, but nothing
> > changed.  You can see the full traceback 
> > at:http://www.missedventures.com/imglog/
>
> What does your urls.py file contain though.
>
> BTW, this is more looking like debugging something related to how
> Django works rather than it being a mod_wsgi issue. Possibly how
> Django deals with something in urls.py differs slightly between
> development server and when run under Apache. Based on past list
> conversations, this sometimes occur where trailing slashes haven't
> been used consistently in the way they should.
>
> Anyway, this is getting beyond my knowledge of Django. If you post the
> urls.py file, someone else might perhaps see something in there which
> is unconventional.
>
> Graham

Graham,

Thanks for your help with the other problems.  I think I will start
another thread specific to this problem (with a little more
appropriate subject).

Thanks again,

Steve Potter


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Strange error, trying to deploy Django with mod_wsgi

2007-09-25 Thread Graham Dumpleton

On Sep 26, 3:59 am, Steve  Potter <[EMAIL PROTECTED]> wrote:
> > This sort of odd error can sometimes come up if you have chosen names
> > for directories/modules which clash with standard Python module names.
>
> > Where you have in your WSGI script file for mod_wsgi something like:
>
> > sys.path.append('/usr/local/django')
> > sys.path.append('/usr/local/django/mysite')
>
> > change it to:
>
> > sys.path.insert(0, '/usr/local/django')
> > sys.path.insert(0, '/usr/local/django/mysite')
>
> > This will ensure that your site directories are first in the path
> > before any of the standard Python modules directory and if you have
> > used a name which is the same as some standard module, your module
> > will take precedence.
>
> > Other than that, would need to see the full error and traceback and if
> > related to something in urls.py, show the contents of your rules as
> > well so can see what target modules/properties are.
>
> > Graham
>
> Graham,
>
> I tried changing the paths as you mentioned above, but nothing
> changed.  You can see the full traceback 
> at:http://www.missedventures.com/imglog/

What does your urls.py file contain though.

BTW, this is more looking like debugging something related to how
Django works rather than it being a mod_wsgi issue. Possibly how
Django deals with something in urls.py differs slightly between
development server and when run under Apache. Based on past list
conversations, this sometimes occur where trailing slashes haven't
been used consistently in the way they should.

Anyway, this is getting beyond my knowledge of Django. If you post the
urls.py file, someone else might perhaps see something in there which
is unconventional.

Graham


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Strange error, trying to deploy Django with mod_wsgi

2007-09-25 Thread Steve Potter


>
> This sort of odd error can sometimes come up if you have chosen names
> for directories/modules which clash with standard Python module names.
>
> Where you have in your WSGI script file for mod_wsgi something like:
>
> sys.path.append('/usr/local/django')
> sys.path.append('/usr/local/django/mysite')
>
> change it to:
>
> sys.path.insert(0, '/usr/local/django')
> sys.path.insert(0, '/usr/local/django/mysite')
>
> This will ensure that your site directories are first in the path
> before any of the standard Python modules directory and if you have
> used a name which is the same as some standard module, your module
> will take precedence.
>
> Other than that, would need to see the full error and traceback and if
> related to something in urls.py, show the contents of your rules as
> well so can see what target modules/properties are.
>
> Graham

Graham,

I tried changing the paths as you mentioned above, but nothing
changed.  You can see the full traceback at: 
http://www.missedventures.com/imglog/

Thanks,

Steven


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Strange error, trying to deploy Django with mod_wsgi

2007-09-25 Thread yml

Hello Steve,

Sometimes ago when I first try to use mod_wsgi I have written a wiki
page there:
   * http://code.djangoproject.com/wiki/django_apache_and_mod_wsgi
It is a step by step procedure that I have followed to configure
mod_wsgi. It might help you to get your application up and running
with mod_wsgi.

Good luck

On Sep 25, 7:26 am, Steve  Potter <[EMAIL PROTECTED]> wrote:
> On Sep 24, 6:16 pm, Graham Dumpleton <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > > Are you sure that the user Apache is running as has permissions
> > > to read directories/files under the missed user's home dir?.
>
> > The permissions issues along with other common issues are described
> > in:
>
> >  http://code.google.com/p/modwsgi/wiki/ApplicationIssues
>
> > What you might do if permissions is an issue is use mod_wsgi daemon
> > mode to delegate your Django instance to a separate daemon process
> > that runs as you rather than the default Apache user.
>
> > Graham
>
> Thanks,
>
> That took care of the error I was receiving, as well as a few
> subsequent ones.  Now I am stuck with another one.
>
> I am able to load the admin properly, but when I try to access my app
> I get the following error:
>
> ViewDoesNotExist at /imglog/
> Tried index in module projectsmt.imglog.views. Error was: 'module'
> object has no attribute 'models'
>
> But the view does exist and works properly with the development
> server.
>
> After looking through the archives, I thought I was running up against
> a path problem.  However I added both the project directory as well as
> its parent directory to the PythonPath.
>
> Still no luck...So then I decided that I still had a permissions
> issue, but I went as far as moving the project into /var/django and
> setting all of the permissions to 777 and I still get the error.
>
> I am at a complete loss, what is the above error referring to when it
> says 'module' object?
>
> I looked through the view.py file for my app, and the only occurrence
> to the word 'models' I could find was in an import statement.
>
> Steve


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Strange error, trying to deploy Django with mod_wsgi

2007-09-25 Thread Graham Dumpleton

On Sep 25, 3:26 pm, Steve  Potter <[EMAIL PROTECTED]> wrote:
> On Sep 24, 6:16 pm, Graham Dumpleton <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > > Are you sure that the user Apache is running as has permissions
> > > to read directories/files under the missed user's home dir?.
>
> > The permissions issues along with other common issues are described
> > in:
>
> >  http://code.google.com/p/modwsgi/wiki/ApplicationIssues
>
> > What you might do if permissions is an issue is use mod_wsgi daemon
> > mode to delegate your Django instance to a separate daemon process
> > that runs as you rather than the default Apache user.
>
> > Graham
>
> Thanks,
>
> That took care of the error I was receiving, as well as a few
> subsequent ones.  Now I am stuck with another one.
>
> I am able to load the admin properly, but when I try to access my app
> I get the following error:
>
> ViewDoesNotExist at /imglog/
> Tried index in module projectsmt.imglog.views. Error was: 'module'
> object has no attribute 'models'
>
> But the view does exist and works properly with the development
> server.
>
> After looking through the archives, I thought I was running up against
> a path problem.  However I added both the project directory as well as
> its parent directory to the PythonPath.
>
> Still no luck...So then I decided that I still had a permissions
> issue, but I went as far as moving the project into /var/django and
> setting all of the permissions to 777 and I still get the error.
>
> I am at a complete loss, what is the above error referring to when it
> says 'module' object?
>
> I looked through the view.py file for my app, and the only occurrence
> to the word 'models' I could find was in an import statement.

This sort of odd error can sometimes come up if you have chosen names
for directories/modules which clash with standard Python module names.

Where you have in your WSGI script file for mod_wsgi something like:

sys.path.append('/usr/local/django')
sys.path.append('/usr/local/django/mysite')

change it to:

sys.path.insert(0, '/usr/local/django')
sys.path.insert(0, '/usr/local/django/mysite')

This will ensure that your site directories are first in the path
before any of the standard Python modules directory and if you have
used a name which is the same as some standard module, your module
will take precedence.

Other than that, would need to see the full error and traceback and if
related to something in urls.py, show the contents of your rules as
well so can see what target modules/properties are.

Graham


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Strange error, trying to deploy Django with mod_wsgi

2007-09-24 Thread Steve Potter


On Sep 24, 6:16 pm, Graham Dumpleton <[EMAIL PROTECTED]>
wrote:

>
> > Are you sure that the user Apache is running as has permissions
> > to read directories/files under the missed user's home dir?.
>
> The permissions issues along with other common issues are described
> in:
>
>  http://code.google.com/p/modwsgi/wiki/ApplicationIssues
>
> What you might do if permissions is an issue is use mod_wsgi daemon
> mode to delegate your Django instance to a separate daemon process
> that runs as you rather than the default Apache user.
>
> Graham

Thanks,

That took care of the error I was receiving, as well as a few
subsequent ones.  Now I am stuck with another one.

I am able to load the admin properly, but when I try to access my app
I get the following error:

ViewDoesNotExist at /imglog/
Tried index in module projectsmt.imglog.views. Error was: 'module'
object has no attribute 'models'

But the view does exist and works properly with the development
server.

After looking through the archives, I thought I was running up against
a path problem.  However I added both the project directory as well as
its parent directory to the PythonPath.

Still no luck...So then I decided that I still had a permissions
issue, but I went as far as moving the project into /var/django and
setting all of the permissions to 777 and I still get the error.

I am at a complete loss, what is the above error referring to when it
says 'module' object?

I looked through the view.py file for my app, and the only occurrence
to the word 'models' I could find was in an import statement.


Steve


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Strange error, trying to deploy Django with mod_wsgi

2007-09-24 Thread Graham Dumpleton

On Sep 25, 8:44 am, "Ramiro Morales" <[EMAIL PROTECTED]> wrote:
> On 9/24/07, Steve Potter <[EMAIL PROTECTED]> wrote:
>
> > [...]
> > But when I
> > tried to load the site I still received a 500 error and the apache
> > error log had the following:
>
> > mod_wsgi (pid=5070): Exception occurred within WSGI script '/home/
> > missed/projectsmt/pjsmt.wsgi'.
> > [...]
> > OSError: [Errno 13] Permission denied: '/home/missed'
>
> > The permission denied error doesn't make much sense, obviously it is
> > able to read the project files, or it wouldn't get this far.
>
> Are you sure that the user Apache is running as has permissions
> to read directories/files under the missed user's home dir?.

The permissions issues along with other common issues are described
in:

  http://code.google.com/p/modwsgi/wiki/ApplicationIssues

What you might do if permissions is an issue is use mod_wsgi daemon
mode to delegate your Django instance to a separate daemon process
that runs as you rather than the default Apache user.

Graham


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Strange error, trying to deploy Django with mod_wsgi

2007-09-24 Thread Ramiro Morales

On 9/24/07, Steve Potter <[EMAIL PROTECTED]> wrote:

> [...]
> But when I
> tried to load the site I still received a 500 error and the apache
> error log had the following:
>
> mod_wsgi (pid=5070): Exception occurred within WSGI script '/home/
> missed/projectsmt/pjsmt.wsgi'.
> [...]
> OSError: [Errno 13] Permission denied: '/home/missed'
>
>
> The permission denied error doesn't make much sense, obviously it is
> able to read the project files, or it wouldn't get this far.
>

Are you sure that the user Apache is running as has permissions
to read directories/files under the missed user's home dir?.

Regards,

-- 
 Ramiro Morales

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---