views:

520

answers:

1

I'm deploying my Django app to another host/server using mod_wsgi and MySQLdb. Right now, I'm getting a 500 error with the following log:

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

Did some research and it looks like the /tmp directory is non-exacutable. Found this: http://bit.ly/ckoIep

Can anyone shed some light on this, and possibly recommend a solution?

+1  A: 

Point the WSGIPythonEggs directive to a writable, executable path.

Ignacio Vazquez-Abrams
Simple and easy solution Ignacio. Thanks.
John K
Or python-eggs option if using WSGIDaemonProcess and daemon mode. On non Windows systems, unless you know about configuring Apache properly, it is recommended you use daemon mode.
Graham Dumpleton