mod_php4 core dumps with some extensions
| From: | Oleg Makarenko | Date: | Fri, 14 Jul 2000 14:25:06 +0000 |
| Subject: | mod_php4 core dumps with some extensions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-24534@lists.php.net to get a copy of this message | ||
I am not sure that is right list to ask... but I have some mysterious
problems with mod_php.
In short, apache core dumps at startup. gdb /usr/sbin/httpd core points
to nonexistent address :(
mod_php4 was build with apxs as so and several extensions (gd, zlib,
dba, mysql, oci8) were also built as so (=shared).
If I disable all extensions everything works fine. If I enable any
module except mysql and oci8 everything works fine too.
mysql.so also works if it was complied with --with-mysql=shared. But if
I use --with-mysql=shared,/usr apache coredumps again... The only
difference I see between mysql.so compiled with /usr and without it is
that /usr/lib/libmysqlclient.so is linked to libpthread while the
library that comes with php4 is not. Oracle client libraries were also
linked with pthread...
Then I have tried to start apache with LD_PRELOAD=libpthread.so and it
worked!
The other way to make apache work is to swap lines AddModule mod_ssl.c
and AddModule mod_php4.c... so without mod_ssl or with mod_ssl loaded
after mod_php4 everything works again. Then I have tried to link
libphp.so with libpthread and that also solves all problems... Why?
That is very strange... Why I don't see core dumps with LD_PRELOAD? Why
don't I see core dumps if I place mod_ssl.c AFTER mod_php4? How is it
all related to libpthread?? It seems like if libpthread is somehow
loaded before mod_ssl that solves the problem...
I have tried mod_ssl list without any luck :( I am not sure that is a
php problem as core dumps go away if I disable mod_ssl. But they also go
away with php3...
I don't understand why all this workarounds work... That makes me
suspect that something is completely wrong with my php...
To 100% reproduce the problem you need a mod_ssl and php both built as
so and mysql built with-mysql=shared,/usr (as an official mysql client
library is built with tread-safe option)...
Can anybody shade some light on my problem? Are there any know issues
with mod_php4 and libpthreaded extensions and mod_ssl?
Oleg