Re: mod_ssl + mod_php4 segmentation faults
| From: | John Sutton | Date: | Thu, 09 Nov 2000 18:29:11 +0000 |
| Subject: | Re: mod_ssl + mod_php4 segmentation faults | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-37602@lists.php.net to get a copy of this message | ||
Thanks for that Rasmus. Yes, my MySQL client libraries *are* linked against
libpthreads and compiling --without-mysql does fix it.
So I've rebuilt the mysql client libs using --disable-thread-safe-client and
that's fixed it. But I'm a bit concerned about not having threads in the
client. Presumably this has some resource/speed implications?
If I understand correctly what you've said, then would an alternative be
to *statically* link pthreads into libmysqlclient.so? Presumably I could do
this by building a static libpthread.a and then fiddle with the MySQL configure
to get it to use this for the client rather than libpthread.so. Sounds
reasonable?
TIA
John
On Thu, 09 Nov 2000, you wrote:
> Are your MySQL client libraries linked against libpthreads? If som you
> are hitting a glibc-2.1.x bug which doesn't let you dynamically load a
> shared library linked against pthreads into an executable not linked
> against pthreads. A quick check would be to compile using
> "--without-mysql" and see if it works. If it does, go grab the
> non-pthreads MySQL client libs and use those instead.
>
> -Rasmus
>
> On Wed, 8 Nov 2000, John Sutton wrote:
>
> > Hi there
> >
> > After many days of grief...
> >
> > kernel 2.2.10
> > apache 1.3.14
> > mod_php4-4.0.3pl1
> > mod_ssl-2.7.1_1.3.14
> >
> > The build proceeds fine (everything is built -DEAPI), and on a redhat 6.0
> > system (glibc-2.1.1) it kinda works. But I keep getting segfaults and the
> > attempt to syntax check even a trivial apache conf file *always* segfaults:
> >
> > # httpd -T -f /etc/httpd/conf/try.conf
> > Syntax OK
> > Segmentation fault (core dumped)
> >
> > try.conf is:
> >
> > ServerRoot /etc/httpd
> > LoadModule php4_module modules/libphp4.so
> > ClearModuleList
> > AddModule mod_php4.c
> > ServerType standalone
> > accessconfig /dev/null
> > resourceconfig /dev/null
> >
> > (it doesn't get much simpler, huh!)
> >
> > If I rebuild apache without applying the mod_ssl patches and then rebuild php4
> > (i.e. without the EAPI), then everything is fine (except that then I've got no
> > secure server!)
> >
> > On a redhat 5.2 sytem (kernel 2.2.3, glibc glibc-2.0.7) - which as Sod's Law
> > would have it, is my live server - the situation is much worse. If I include
> > php4 in the conf file, apache refuses to start at all. It just hangs, no
> > output anywhere...
> >
> > mod_ssl + mod_php3-3.0.17 builds and runs fine on both platforms.
> >
> > Here is the build procedure I'm using with some detail:
> >
> > # Apply patches to apache
> > cd mod_ssl-2.7.1-1.3.14
> > ./configure --with-apache=.. --with-eapi-only
> >
> > # Build and install apache
> > cd ..
> > ./configure --prefix=/usr \
> > --enable-module=all \
> > --enable-shared=max \
> > --enable-rule=EAPI \
> > --disable-rule=WANTHSREGEX
> >
> > make
> > make install
> >
> > # Build mod_ssl, php3 and php4
> > cd mod_ssl-2.7.1-1.3.14
> > ./configure \
> > --with-apxs=/usr/sbin/apxs \
> > --with-ssleay=/usr/local/ssl
> >
> > cd php4-4.0.3pl1
> > ./configure --prefix=/usr \
> > --with-apxs=/usr/sbin/apxs \
> > --with-config-file-path=/usr/lib \
> > --enable-debug=no \
> > --enable-safe-mode \
> > --with-exec-dir=/usr/bin \
> > --with-mysql=/usr \
> > --with-regex=system \
> > --enable-versioning
> >
> > cd php3-3.0.17
> > ./configure --prefix=/usr \
> > --with-apxs=/usr/sbin/apxs \
> > --with-config-file-path=/usr/lib \
> > --enable-debug=no \
> > --enable-safe-mode \
> > --with-exec-dir=/usr/bin \
> > --with-mysql=/usr \
> > --with-system-regex \
> > --enable-versioning
> >
> > Getting desperate. Any help much appreciated!
> >
> > ***************************************************
> > John Sutton
> > SCL Computer Services
> > URL http://www.scl.co.uk/
> > Tel. +44 (0) 1239 621021
> > ***************************************************
> >
> > --
> > PHP Development Mailing List <http://www.php.net/>
> > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-dev-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
> >
--
***************************************************
John Sutton
SCL Computer Services
URL http://www.scl.co.uk/
Tel. +44 (0) 1239 621021
***************************************************