Hello

I'm trying to deploy django with mod_wsgi on a media temple. I have an
error that says:

TemplateSyntaxError: Caught ImproperlyConfigured while rendering:
Error loading MySQLdb module: /var/tmp/.python_eggs/
MySQL_python-1.2.3c1-py2.4-linux-i686.egg-tmp/_mysql.so: failed to map
segment from shared object: Operation not permitted

I understand this happens when the user apache is running as doesn't
have permission to write and execute whatever the PYTHON_EGG_CACHE
directory is.

In my .wsgi file I have the line:
os.environ['PYTHON_EGG_CACHE'] = '/var/tmp/.python_eggs'

(I noticed a lot of people suggested pointing this to /tmp, but that
didn't work either).

/var/tmp/.python_eggs is owned by apache:apache and when I try to
access the page, I notice a mysql module directory is created
inside .python_eggs directory. (If I delete it and load the page
again, it's recreated)

I'm able to import MySQLdb from python without any errors. Does any
one have any suggestions about how to troubleshoot this?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
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