Graham Dumpleton wrote:
>
> On Nov 26, 3:32 pm, Django Newbie <[EMAIL PROTECTED]> wrote:
>   
>> Hi Everybody,
>>
>> Django newbie here.  I'm trying to get it to work under apache with
>> mod_python on a freebsd server but running into problems.  I searched
>> the archives and found similar things, but I tried all the suggestions
>> and still no luck.
>>
>> The error:
>>
>> MOD_PYTHON ERROR
>>
>> ProcessId:      11226
>> Interpreter:    'dinnertools'
>>
>> ServerName:     'gidget.cws-web.com'
>> DocumentRoot:   '/home/dave/www/gidget.cws-web.com'
>>
>> URI:            '/dinnertools/'
>> Location:       '/dinnertools/'
>> Directory:      None
>> Filename:       '/home/dave/www/gidget.cws-web.com/dinnertools'
>> PathInfo:       '/'
>>
>> Phase:          'PythonHandler'
>> Handler:        'django.core.handlers.modpython'
>>
>> Traceback (most recent call last):
>>
>>  File "/usr/local/lib/python2.5/site-packages/mod_python/importer.py",
>> line 1537, in HandlerDispatch
>>    default=default_handler, arg=req, silent=hlist.silent)
>>
>>  File "/usr/local/lib/python2.5/site-packages/mod_python/importer.py",
>> line 1229, in _process_target
>>    result = _execute_target(config, req, object, arg)
>>
>>  File "/usr/local/lib/python2.5/site-packages/mod_python/importer.py",
>> line 1128, in _execute_target
>>    result = object(arg)
>>
>>  File
>> "/usr/local/lib/python2.5/site-packages/django/core/handlers/modpython.py",
>> line 228, in handler
>>    return ModPythonHandler()(req)
>>
>>  File
>> "/usr/local/lib/python2.5/site-packages/django/core/handlers/modpython.py",
>> line 201, in __call__
>>    response = self.get_response(request)
>>
>>  File
>> "/usr/local/lib/python2.5/site-packages/django/core/handlers/base.py",
>> line 67, in get_response
>>    response = middleware_method(request)
>>
>>  File
>> "/usr/local/lib/python2.5/site-packages/django/contrib/sessions/middleware. 
>> py",
>> line 9, in process_request
>>    engine = __import__(settings.SESSION_ENGINE, {}, {}, [''])
>>
>>  File
>> "/usr/local/lib/python2.5/site-packages/django/contrib/sessions/backends/db 
>> .py",
>> line 2, in <module>
>>    from django.contrib.sessions.models import Session
>>
>>  File
>> "/usr/local/lib/python2.5/site-packages/django/contrib/sessions/models.py",
>> line 4, in <module>
>>    from django.db import models
>>
>>  File "/usr/local/lib/python2.5/site-packages/django/db/__init__.py",
>> line 16, in <module>
>>    backend = __import__('%s%s.base' % (_import_path,
>> settings.DATABASE_ENGINE), {}, {}, [''])
>>
>>  File
>> "/usr/local/lib/python2.5/site-packages/django/db/backends/mysql/base.py",
>> line 13, in <module>
>>    raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
>>
>> My apache setup:
>> PythonImport /home/dave/dinnertools/egg.py dinnertools
>>
>>    <Location "/dinnertools/">
>>      SetHandler python-program
>>      PythonHandler django.core.handlers.modpython
>>      SetEnv DJANGO_SETTINGS_MODULE settings
>>      PythonInterpreter dinnertools
>>      PythonOption django.root /dinnertools
>>      PythonDebug On
>>      PythonPath "['/home/dave/dinnertools'] + sys.path"
>>    </Location>
>>
>> ImproperlyConfigured: Error loading MySQLdb module: Shared object
>> "libmysqlclient_r.so.15" not found, required by "_mysql.so"
>>
>> The egg.py file:
>>
>> import os
>> os.environ['PYTHON_EGG_CACHE'] = '/www/htdocs/egg_cache'
>>
>> my project directory:
>> # ll
>> total 9
>> -rw-r--r--  1 dave  dave     0 Nov 21 11:00 __init__.py
>> -rw-r--r--  1 dave  dave   145 Nov 21 11:01 __init__.pyc
>> -rw-r--r--  1 dave  dave    67 Nov 25 15:03 egg.py
>> -rw-r--r--  1 dave  dave   546 Nov 21 11:00 manage.py
>> drwxr-xr-x  2 dave  dave   512 Nov 21 11:23 recipes
>> -rw-r--r--  1 dave  dave  2862 Nov 25 21:14 settings.py
>> -rw-r--r--  1 dave  dave  1817 Nov 25 10:26 settings.pyc
>> -rw-r--r--  1 dave  dave   541 Nov 25 10:30 urls.py
>> #
>>
>> DB connections of course work outside of the apache/mod_python
>> environment.  Also I would expect some temporary file to be unpacked in
>> the /www/htdocs/egg_cache directory, but I don't see any.  The
>> permissions on the egg_cache directory are such that apache should be
>> able to write to it.
>>
>> Any ideas?  I assume I need the extra setup related to egg file since
>> the MySQLdb module has some egg files related to it.  Please let me know
>> what I'm missing.
>>
>> Thanks,
>>
>> Yours truly, django newbie.
>>     
>
> Your libmysqlclient_r.so.15 file can't be installed in a standard
> location. Where is it installed? Do you have anything set in your user
> environment so it can be found when you run it as you? Apache runs as
> a different user and will not have your environment.
>
> Graham
> >
>   
It is in /usr/local/lib/mysql.  Does it not use the ldconfig hints?  It 
shows up with a ldconfig -r (Freebsd way of showing the contents of the 
hints file).

django newbie.



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