On Oct 28, 11:58 pm, Giles Thomas <[EMAIL PROTECTED]>
wrote:
> Graham,
>
> Thank you again for the help - as you might have guessed, my separate
> question that you answered on themod_wsgilist was because I'd decided
> to try out the WSGI solution to the problem first.
>
> What's very strange is that although I did get the same crash when I
> first tried running up Apache + PHP  +mod_wsgias I had with mod_python
> - as you would expect - it now works fine!  I *think* that the change
> that fixed it was when I ran apt-get remove libapache2-mod-python - but
> I'm not quite sure why that worked.

If mod_python or mod_wsgi is compiled against Python static libraries,
then using them together can causes crashes. See:

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

Thus, one you uninstalled mod_python and did a full stop and start of
Apache, problem would go away.

> So I'm now in the uncomfortable position of having a server that works
> perfectly well, when I'm pretty sure that it should not.  One
> possibility: I'm using PHP5, and although the Django page [1] just says
> that there can be problems with PHP, the mod_python description of the
> bug [2] in one place refers to PHP4 - so perhaps the problem wasn't with
> PHP in the first place, but was instead some kind of mod_python version
> incompatibility.
>
> Anyway, for now I'll leave this alone and just keep an eye on it in case
> things start going wrong again.  In case it's of any interest, here's
> what I got when I checked the MySQL library versions in the current
> working setup:
>
> -------------------------------
> # ldd /usr/lib/python2.4/site-packages/_mysql.so | grep mysql
>         libmysqlclient_r.so.15 => /usr/lib/libmysqlclient_r.so.15
> (0x00002b8df7860000)
> # ldd /usr/lib/apache2/modules/mod_*.so | grep mysql
> # ldd /usr/lib/php5/20060613/* | grep mysql
> /usr/lib/php5/20060613/mysqli.so:
>         libmysqlclient.so.15 => /usr/lib/libmysqlclient.so.15
> (0x00002b8f8bd3f000)
> /usr/lib/php5/20060613/mysql.so:
>         libmysqlclient.so.15 => /usr/lib/libmysqlclient.so.15
> (0x00002b28d2295000)
> /usr/lib/php5/20060613/pdo_mysql.so:
>         libmysqlclient.so.15 => /usr/lib/libmysqlclient.so.15
> (0x00002ba328e47000)

There is still the risk of conflicts as Python module is using a
reentrant version of library and PHP isn't.

What this means is that if doing multithreaded stuff in Python, it
could crash in MySQL client library if PHP library taking precedence.
If data structures sizes are different for each library type, it could
crash without multithread use.

Graham

> Cheers,
>
> Giles
>
> [1]http://docs.djangoproject.com/en/dev/howto/deployment/modpython/#if-y...
>
> [2]http://modpython.org/FAQ/faqw.py?req=show&file=faq02.013.htp
>
> --
> Giles Thomas
> MD & CTO, Resolver Systems Ltd.
> [EMAIL PROTECTED]
> +44 (0) 20 7253 6372
>
> Try out Resolver One! <http://www.resolversystems.com/get-it/>
>
> 17a Clerkenwell Road, London EC1M 5RD, UK
> VAT No.: GB 893 5643 79
> Registered in England and Wales as company number 5467329.
> Registered address: 843 Finchley Road, London NW11 8NA, UK
--~--~---------~--~----~------------~-------~--~----~
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