From owner-freebsd-questions@FreeBSD.ORG Fri Sep 10 13:51:19 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5D60C16A4CE for ; Fri, 10 Sep 2004 13:51:19 +0000 (GMT) Received: from smtp.infracaninophile.co.uk (happy-idiot-talk.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id C490343D49 for ; Fri, 10 Sep 2004 13:51:17 +0000 (GMT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) i8ADpC5H052307 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 10 Sep 2004 14:51:12 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)i8ADpCe6052306; Fri, 10 Sep 2004 14:51:12 +0100 (BST) (envelope-from matthew) Date: Fri, 10 Sep 2004 14:51:11 +0100 From: Matthew Seaman To: Vonleigh Simmons Message-ID: <20040910135111.GA50475@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , Vonleigh Simmons , freebsd-questions@freebsd.org References: <535FEA17-02B4-11D9-A03B-000A2791B6EC@illusionart.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LZvS9be/3tNcYl/X" Content-Disposition: inline In-Reply-To: <535FEA17-02B4-11D9-A03B-000A2791B6EC@illusionart.com> User-Agent: Mutt/1.4.2.1i X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.5.6 (smtp.infracaninophile.co.uk [IPv6:::1]); Fri, 10 Sep 2004 14:51:12 +0100 (BST) X-Virus-Scanned: clamd / ClamAV version devel-20040904, clamav-milter version 0.75l on smtp.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.64 X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on happy-idiot-talk.infracaninophile.co.uk cc: freebsd-questions@freebsd.org Subject: Re: Apache+mod_ssl + mod_php segfault X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Sep 2004 13:51:19 -0000 --LZvS9be/3tNcYl/X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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=20 > desperate because I need to get this working, so if you can suggest=20 > anything at all, I'd really appreciate it. I'm running FreeBSD 5.2-RELEAS= E,=20 > apache is apache13-modssl, php is the mod_php version. All latest version= s=20 > (cvsup this morning). >=20 > The problem is that apache segfaults on startup when=20 > loadmodule/addmodule php are in the config file. Originally I fixed the= =20 > problem by compiling apache without expat. However, after a portupgrade= =20 > it stopped working again. >=20 > Right now it's working with a major kludge: start up apache with=20 > loadmodule/addmodule commented out, comment them back in and do an=20 > apachectl restart. Somehow this lets apache work without segfaulting.=20 > However, if I do an apachectl graceful/restart, then it segfaults again= =20 > and won't start up. >=20 > I've tried recompiling apache, recompiling php, getting rid of php=20 > extensions, etc, all to no avail. There is nothing in the logs, it=20 > 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 conflicts: % ldd /usr/local/sbin/httpd=20 /usr/local/sbin/httpd: libz.so.2 =3D> /usr/lib/libz.so.2 (0x280b3000) libssl.so.3 =3D> /usr/lib/libssl.so.3 (0x280c1000) libcrypto.so.3 =3D> /usr/lib/libcrypto.so.3 (0x280f0000) libaprutil-0.so.9 =3D> /usr/local/lib/apache2/libaprutil-0.so.9= (0x281ed000) libexpat.so.5 =3D> /usr/local/lib/libexpat.so.5 (0x281ff000) libiconv.so.3 =3D> /usr/local/lib/libiconv.so.3 (0x2821d000) libapr-0.so.9 =3D> /usr/local/lib/apache2/libapr-0.so.9 (0x2830= b000) libm.so.2 =3D> /usr/lib/libm.so.2 (0x28327000) libcrypt.so.2 =3D> /usr/lib/libcrypt.so.2 (0x28343000) libc.so.4 =3D> /usr/lib/libc.so.4 (0x2835c000) =20 % ldd /usr/local/libexec/apache2/libphp5.so=20 /usr/local/libexec/apache2/libphp5.so: libcrypt.so.2 =3D> /usr/lib/libcrypt.so.2 (0x28266000) libm.so.2 =3D> /usr/lib/libm.so.2 (0x2827f000) libxml2.so.5 =3D> /usr/local/lib/libxml2.so.5 (0x2829b000) libz.so.2 =3D> /usr/lib/libz.so.2 (0x2838e000) libiconv.so.3 =3D> /usr/local/lib/libiconv.so.3 (0x2839c000) =20 Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --LZvS9be/3tNcYl/X Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBQbFPiD657aJF7eIRAg6kAJ0QB+JlFPe1yCHLg2YbS2nz25yjzgCdGSHD zWwQqMlYAMWulkuhLAwnYys= =b6ZS -----END PGP SIGNATURE----- --LZvS9be/3tNcYl/X--