Stupid Google groups seems to have trashed my last response, now I
have to type it all in again. Apologies if this is a duplicate.

Anyway, for one explanation, see description on access rights of
Apache user in mod_wsgi documentation at:

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

Although not mod_python the issue is exactly the same.

In mod_python, only practical way of solving it without modifying
Apache startup scripts is to use PythonImport directive to reference
module containing:

  import os
  os.environ['PYTHON_EGG_CACHE'] = '/some/directory'

Where '/some/directory' is writable to user that Apache runs as.

When using PythonImport you need to name the Python interpreter that
your Django application is running in, usually the name of the
VirtualHost under mod_python. If you can't work it out, use
PythonInterpreter to explicitly name what interpreter you want Django
instance to use and use same name with PythonImport. See mod_python
documentation for more details on these directives.

Graham


On Apr 24, 4:15 pm, [EMAIL PROTECTED] wrote:
> Hi,
>
> I have a django site that just launched using mod_python, apache2, and
> redhat. It's a medium sized site, everything worked great for a couple
> days, yesterday I suddenly got error after error in my apache logs
> such as the ones below. This happens even though there are no code
> changes. The site stays down until I restart reload apache and the
> site works again. But today the site went down and I got very similar
> errors. The old site used to have different urls, could people/bots
> trying to retrieve old urls be confusing django?
>
> Thanks, any help would be greatly appreciated,
>
> Leon
>
> [Mon Apr 23 19:09:18 2007] [error] [client 66.249.65.230]
> PythonHandler django.core.handlers.modpython: ExtractionError: Can't
> extract file(s) to egg cache\n\nThe following error occurred while
> trying to extract file(s) to the Python egg\ncache:\n\n  [Errno 13]
> Permission denied: '/.python-eggs'\n\nThe Python egg cache directory
> is currently set to:\n\n  /.python-eggs\n\nPerhaps your account does
> not have write access to this directory?  You can\nchange the cache
> directory by setting the PYTHON_EGG_CACHE environment\nvariable to
> point to an accessible directory.\n
>
> [Mon Apr 23 19:11:31 2007] [error] [client 24.215.224.50]
> PythonHandler django.core.handlers.modpython:   File "/usr/lib/
> python2.3/site-packages/django/core/handlers/base.py", line 35, in
> load_middleware\n    raise exceptions.ImproperlyConfigured,
> 'Middleware module "%s" does not define a "%s" class' % (mw_module,
> mw_classname)
> [Mon Apr 23 19:11:31 2007] [error] [client 24.215.224.50]
> PythonHandler django.core.handlers.modpython: ImproperlyConfigured:
> Middleware module "django.contrib.sessions.middleware" does not define
> a "SessionMiddleware" class


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to