Click to See Complete Forum and Search --> : php core dumping


Fandelem
03-06-2002, 02:17 AM
Hmm.. okay I tried again today, and it seems to have installed /usr/bin/php.. however.. now when i try something like, php -v it seg faults.

i had:


[root@srv05 /php-4.1.2]# rpm -q php
php-4.0.6-2ensim8
[root@srv05 /php-4.1.2]#


and i'm installing the source for php4.1.2..

i did:


./configure \
--prefix=/usr --with-config-file-path=/etc\
--disable-debug --enable-pic --enable-inline-optimization\
--with-apxs=/usr/sbin/apxs --with-exec-dir=/usr/bin\
--with-regex=system --with-gettext=shared --with-gd\
--with-flex --with-jpeg-dir=/usr --with-png --with-ttf\
--with-zlib --with-db3 --with-gdbm --with-openssl\
--with-layout=GNU --enable-debugger --enable-magic-quotes\
--enable-safe-mode --enable-sockets --enable-sysvsem=shared\
--enable-sysvshm=shared --enable-yp\
--enable-ftp=shared --enable-wddx \
--without-unixODBC --without-oracle --without-oci8


make
make install
make install-modules

in php.ini, i have it pointing to
/usr/lib/php/20010901
(which is where make install-modules put them)

when i 'apache restart' i no longer get errors, and if i run something via apache (such as phpinfo() ) it will run. but if i try it from the command line, such as 'php -v' or 'php test.php' it will seg fault.


[root@srv05 /php-4.1.2]# php -v
Segmentation fault (core dumped)
[root@srv05 /php-4.1.2]#


here is the bt of the core dump, if it helps? :)


#0 0x40475abc in _IO_vfprintf (s=0xbfffef50,
format=0x40127e40 "%s: Unable to initialize module\nModule compiled with
debug=%d, thread-safety=%d module API=%
d\nPHP compiled with debug=%d, thread-
safety=%d module API=%d\nThese options need
to match\n", ap=0xbffff91c)
at ../sysdeps/i386/i486/bits/string.h:530
#1 0x40496f04 in _IO_vsnprintf (string=0xbffff480 "", maxlen=1023,
format=0x40127e40 "%s: Unable to
initialize module\nModule compiled with
debug=%d, thread-safety=%d module API=%
d\nPHP compiled with debug=%d, thread-
safety=%d module API=%d\nThese options need
to match\n", args=0xbffff918)
at vsnprintf.c:130
#2 0x40079380 in php_error_cb () from /usr/lib/libphp4.so.0
#3 0x40068c8c in zend_error () from /usr/lib/libphp4.so.0
#4 0x400ba063 in php_dl () from /usr/lib/libphp4.so.0
#5 0x4007c221 in php_load_function_extension_cb () from /usr/lib/libphp4.so.0
#6 0x40061bb9 in zend_llist_apply () from /usr/lib/libphp4.so.0
#7 0x4007c509 in php_ini_delayed_modules_startup ()
from /usr/lib/libphp4.so.0
#8 0x4007a159 in php_module_startup () from /usr/lib/libphp4.so.0
#9 0x400782a7 in main () from /usr/lib/libphp4.so.0
#10 0x4043a627 in __libc_start_main (main=0x8048610 <main>, argc=2,
ubp_av=0xbffffb7c, init=0x80485c8 <_init>, fini=0x8048780 <_fini>,
rtld_fini=0x4000dcc4 <_dl_fini>, stack_end=0xbffffb6c)
at ../sysdeps/generic/libc-start.c:129
(gdb)


i'm almost 100% sure it's having some old module somewhere .. could anyone please point me in the right direction as to where modules like this can be tracked down & fixed? :)

basically.. i'm curious as to what you guys typically do in a situation where you have an RPM already installed, and you want to install source.. how you go about removing the RPM (especially when there's a page of dependencies that the RPM has...)

cheers,

kyle

[ 06 March 2002: Message edited by: Fandelem ]

Choozo
03-06-2002, 04:22 AM
I just removed the PHP and Apache rpms from my Mandrake 8.0 installation, and installed both again from source. Also removed those packages that PHP and Apache relied on as those only related to *-dev, *-doc packages, and Zope which I didn't need.

If you need some of the packages that you have to remove in order to remove PHP/Apache packages, get the source for those too and compile it.

Cheers :)