Likely that your mod_python was compiled against a different Python
version for which mysql wasn't installed, or it used a static Python
library and not a shared library. Such mismatches can causes crashes,
strange behaviour or outright failure. Have a read about this conflict
between mod_python and mod_wsgi in:

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

Graham

On 9 February 2010 03:00, Jer <[email protected]> wrote:
> Hello,
>     I just recently put modwsgi on both my personal and production
> servers, both servers are running Fedora Core 7 w/Apache2.
>
> I have the same basic setup between the two servers, however I'm
> running into an odd issue with the production server and modwsgi. I
> get the following error in the apache logs when trying to hit the
> site:
>
> [Mon Feb 08 10:40:30 2010] [error] [client 208.247.xx.xxx] mod_wsgi
> (pid=24538): Exception occurred processing WSGI script '/
> django_projects/srm/django.wsgi'., referer: http://mysite.com/standards/
> [Mon Feb 08 10:40:30 2010] [error] [client 208.247.xx.xxx] Traceback
> (most recent call last):, referer: http://mysite.com/standards/
> [Mon Feb 08 10:40:30 2010] [error] [client 208.247.xx.xxx]   File "/
> usr/local/lib/python2.5/site-packages/django/core/handlers/wsgi.py",
> line 230, in __call__, referer: http://mysite.com/standards/
> [Mon Feb 08 10:40:30 2010] [error] [client 208.247.xx.xxx]
> self.load_middleware(), referer: http://mysite.com/standards/
> [Mon Feb 08 10:40:30 2010] [error] [client 208.247.xx.xxx]   File "/
> usr/local/lib/python2.5/site-packages/django/core/handlers/base.py",
> line 42, in load_middleware, referer: http://mysite.com/standards/
> [Mon Feb 08 10:40:30 2010] [error] [client 208.247.xx.xxx]     raise
> exceptions.ImproperlyConfigured, 'Error importing middleware %s: "%s"'
> % (mw_module, e), referer: http://mysite.com/standards/
> [Mon Feb 08 10:40:30 2010] [error] [client 208.247.xx.xxx]
> ImproperlyConfigured: Error importing middleware
> django.contrib.flatpages.middleware: "No module named mysql.base",
> referer: http://mysite.com/standards/
>
>
> If I uncomment LoadModule python_module modules/mod_python.so then I
> don't get the error and the site loads.
>
> Here is the apache config:
>
> #LoadModule python_module modules/mod_python.so
> LoadModule php5_module modules/libphp5.so
> AddHandler php5-script php
> LoadModule wsgi_module modules/mod_wsgi.so
>
>
> <VirtualHost *>
>  ServerName mysite.com
>   WSGIScriptAlias / /django_projects/thesite/django.wsgi
> </VirtualHost>
> <Directory /django_projects/thesite/>
>       Order deny,allow
>       Allow from all
> </Directory>
>
> and my django.wgsi file:
>
> import os
> import sys
> os.environ['PYTHON_EGG_CACHE'] = '/python-egg-cache'
> os.environ['DJANGO_SETTINGS_MODULE'] = 'thesite.settings'
>
> sys.path.append('/django_projects')
> import django.core.handlers.wsgi
> application = django.core.handlers.wsgi.WSGIHandler()
>
>
> Any help would be appreciated. If you need information/I left anything
> out, please let me know.
>
> Thanks,
> Jer
>
> --
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" 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/modwsgi?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" 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/modwsgi?hl=en.

Reply via email to