Apache+mod_ssl + mod_php segfault
m.seaman at infracaninophile.co.uk
Fri Sep 10 06:51:19 PDT 2004
On Thu, Sep 09, 2004 at 04:02:30PM -0700, Vonleigh Simmons wrote:
> I sent this already but didn't get any replies. I'm a little
> desperate because I need to get this working, so if you can suggest
> anything at all, I'd really appreciate it. I'm running FreeBSD 5.2-RELEASE,
> apache is apache13-modssl, php is the mod_php version. All latest versions
> (cvsup this morning).
> The problem is that apache segfaults on startup when
> loadmodule/addmodule php are in the config file. Originally I fixed the
> problem by compiling apache without expat. However, after a portupgrade
> it stopped working again.
> Right now it's working with a major kludge: start up apache with
> loadmodule/addmodule commented out, comment them back in and do an
> apachectl restart. Somehow this lets apache work without segfaulting.
> However, if I do an apachectl graceful/restart, then it segfaults again
> and won't start up.
> I've tried recompiling apache, recompiling php, getting rid of php
> extensions, etc, all to no avail. There is nothing in the logs, it
> simply fails to start up. Any help or ideas are greatly appreciated.
This sounds to me very much like you've got the mod_php loadable
object linked against an incompatible version of a shlib which
apach+mod_ssl is also linked to. At a guess:
i) I'd finger the OpenSSL libs as a prime suspect: particularly if
you've also installed OpenSSL from ports. It's not necessary
to install OpenSSL from ports as the version in the base system
is perfectly OK.
ii) Different threading libraries can have similar bad effects.
Everything should be compiled using the same threading
libraries: if necessary, use /etc/libmap.conf to force the
issue. (Although I've never heard of that being necessary for
any variant of apache before now)
The reason your kludge works would be to do with the order of
resolving the required shlibs: something like one shlib resolves all
the required symbols, but the other one is missing some.
Use ldd(1) to investigate what shlibs a binary needs, and check for
% ldd /usr/local/sbin/httpd
libz.so.2 => /usr/lib/libz.so.2 (0x280b3000)
libssl.so.3 => /usr/lib/libssl.so.3 (0x280c1000)
libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x280f0000)
libaprutil-0.so.9 => /usr/local/lib/apache2/libaprutil-0.so.9 (0x281ed000)
libexpat.so.5 => /usr/local/lib/libexpat.so.5 (0x281ff000)
libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x2821d000)
libapr-0.so.9 => /usr/local/lib/apache2/libapr-0.so.9 (0x2830b000)
libm.so.2 => /usr/lib/libm.so.2 (0x28327000)
libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x28343000)
libc.so.4 => /usr/lib/libc.so.4 (0x2835c000)
% ldd /usr/local/libexec/apache2/libphp5.so
libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x28266000)
libm.so.2 => /usr/lib/libm.so.2 (0x2827f000)
libxml2.so.5 => /usr/local/lib/libxml2.so.5 (0x2829b000)
libz.so.2 => /usr/lib/libz.so.2 (0x2838e000)
libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x2839c000)
Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614 Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040910/e77c2e26/attachment.bin
More information about the freebsd-questions