So I compiled php-5.1.4 on RH4 with httpd 2.0.52 (from rh rpm) and the php binary seems to work fine but when I try to open a php page through apache from my browser, apache seg faults. I compiled php-4.3.9 with exactly the same options and it works fine. Any ideas?!
Here are the details:
(I dont directly overwrite the httpd.conf on purpose)
cp /etc/httpd/conf/httpd.conf /tmp/rpmbuild/etc/httpd/conf/
./configure \
--prefix=/tmp/rpmbuild \
--with-apxs2=/usr/sbin/apxs \
--enable-shared \
--enable-static \
--enable-sockets \
--without-kerberos \
--without-curl \
--with-gd=no \
--with-png-dir=no \
--without-readline \
--with-pgsql=shared \
--disable-rpath \
&& make -j4 && make install INSTALL_ROOT=/tmp/rpmbuild/
cp /tmp/rpmbuild/etc/httpd/conf/ /etc/httpd/conf/httpd.conf
/etc/init.d/httpd restart
All that I see in the log file is something like that:
[Fri Jun 16 16:20:02 2006] [notice] child pid 19673 exit signal Segmentation fault (11)
So I ran httpd with gdb to see where it crashes:
#gdb /usr/sbin/httpd
GNU gdb Red Hat Linux (6.3.0.0-1.63rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...(no debugging symbols found)
Using host libthread_db library "/lib/tls/libthread_db.so.1".
warning: not using untrusted file ".gdbinit"
(gdb) run -X
Starting program: /usr/sbin/httpd -X
(no debugging symbols found)
....
(no debugging symbols found)
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208174912 (LWP 16760)]
0x00000000 in ?? ()
(gdb)
(gdb)
(gdb) bt
#0 0x00000000 in ?? ()
#1 0x011f8d4f in php_hash_environment () at /root/php-5.1.4/main/php_variables.c:656
#2 0x011ee562 in php_request_startup () at /root/php-5.1.4/main/main.c:1113
#3 0x0129b87b in php_handler (r=0x85b6d40) at /root/php-5.1.4/sapi/apache2handler/sapi_apache2.c:542
#4 0x00e6c9b7 in ap_run_handler () from /usr/sbin/httpd
#5 0x00e6ce23 in ap_invoke_handler () from /usr/sbin/httpd
#6 0x00e698b5 in ap_process_request () from /usr/sbin/httpd
#7 0x00e6463f in _start () from /usr/sbin/httpd
#8 0x085b6d40 in ?? ()
#9 0x00000004 in ?? ()
#10 0x085b6d40 in ?? ()
#11 0x085b0b28 in ?? ()
#12 0x085b0b3c in ?? ()
#13 0x00000000 in ?? ()
(gdb)