Rebuilding apache doesn't help

# python
Python 2.5.1 (r251:54863, Jun 28 2007, 13:12:40)
[GCC 3.4.6 [FreeBSD] 20060305] on freebsd6
Type "help", "copyright", "credits" or "license" for more information.
>>> import md5
>>> import _md5
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named _md5
>>> import hashlib
>>> import _hashlib


so i have error when importing _md5 and have no erroro when importing
md5. What it mean? :)

On Jul 7, 2:40 pm, Graham Dumpleton <[EMAIL PROTECTED]>
wrote:
> On Jul 7, 6:25 pm, e-gor <[EMAIL PROTECTED]> wrote:
>
> > Switching off mod_php doesn't help.
>
> > when i import module md5 from command prompt there are no errors:
>
> > # python
> > Python 2.5.1 (r251:54863, Jun 28 2007, 13:12:40)
> > [GCC 3.4.6 [FreeBSD] 20060305] on freebsd6
> > Type "help", "copyright", "credits" or "license" for more information.>>> 
> > import md5
> > >>> import blahblah
>
> > Traceback (most recent call last):
> >   File "<stdin>", line 1, in <module>
> > ImportError: No module named blahblah
>
> Can you import 'hashlib' on the command line:
>
>   import hashlib
>
> In Python 2.5 how the hash library modules is done was changed. This
> has caused issues before:
>
>  http://www.modpython.org/pipermail/mod_python/2007-April/023508.html
>  http://www.modpython.org/pipermail/mod_python/2007-April/023512.html
>
> A suitable answer wasn't found as it fixed itself when person
> recompiled Apache.
>
> My suspicion is that in recompiling Apache, Apache was then using the
> same shared library version of something (probably SSL libraries) as
> one of the Python hash modules was using. Previous to that it was
> using different versions and that caused a problem when loading one of
> the Python modules, thus resulting in it falling back to trying to
> load _md5 when it shouldn't have. Loading _md5 would fail as in Python
> 2.5 it doesn't necessarily exist as hashlib modules replace it from
> memory.
>
> Note, in recompiling Apache it may be important to ensure that it
> finds and uses system SSL libraries, otherwise it will use one from
> its own source code and that is where the clash may arise because
> Python will use the system one instead.
>
> Graham
>
> > On Jul 6, 4:26 pm, Roboto <[EMAIL PROTECTED]> wrote:
>
> > > i'm not great at this, but a shot in the dark - turn off mod_php
>
> > > On Jul 5, 2:59 pm, e-gor <[EMAIL PROTECTED]> wrote:
>
> > > > I have python 2.5.1, django report errors:
>
> > > >Mod_pythonerror: "PythonHandler django.core.handlers.modpython"
>
> > > > Traceback (most recent call last):
>
> > > >   File "/usr/local/lib/python2.5/site-packages/mod_python/apache.py",
> > > > line 193, in Dispatch
> > > >     result = object(req)
>
> > > >   File "/usr/local/lib/python2.5/site-packages/django/core/handlers/
> > > > modpython.py", line 177, in handler
> > > >     return ModPythonHandler()(req)
>
> > > >   File "/usr/local/lib/python2.5/site-packages/django/core/handlers/
> > > > modpython.py", line 145, in __call__
> > > >     self.load_middleware()
>
> > > >   File "/usr/local/lib/python2.5/site-packages/django/core/handlers/
> > > > base.py", line 31, in load_middleware
> > > >     raise exceptions.ImproperlyConfigured, 'Error importing middleware
> > > > %s: "%s"' % (mw_module, e)
>
> > > > ImproperlyConfigured: Error importing middleware
> > > > django.middleware.common: "No module named _md5"
>
> > > > When i write import md5 from python command prompt i have no errors.


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