[php-maint] Bug#388601: dba_open from php 5.1.6, testing fails with Driver initialization failed for handler: db4: Unknown, error 140682440

Mircea Negreanu nemesis at home.ro
Mon Sep 25 08:14:01 UTC 2006


Hi,

There is something strange with this bug.

I instaled libdb4.2-dev (apt-get isntall libdb4.2-dev),
then I tested the latest snapshot (php 5.2 cvs) as requested by php team
and it worked.

Then I downloaded php-5.1.6 from www.php.net, untared into my home
directory and:
./configure --enable-dba --with-db4=/usr --disable-libxml --disable-xml
--disable-simplexml --disable-dom --disable-xmlwriter
--disable-simplexml --disable-xmlreader
--with-config-file-path=/home/my_directory/php5.1.6/ --without-pear
make
cd sapi/cli.
php test.php - and it worked
(same with sapi/cgi)
then

make distclean
/configure --enable-dba=shared --with-db4=/usr --disable-libxml
--disable-xml --disable-simplexml --disable-dom --disable-xmlwriter
--disable-simplexml --disable-xmlreader
--with-config-file-path=/home/my_directory/php5.1.6/ --without-pear
make
copy the php.ini-dist to php.ini
modify php.ini so that extensions points to this directory/modules
modify php.ini to load dba.so
cd sapi/cli
php test.php - and also works.
(same with sapi/cgi).

Tested also with libddb4.3-dev and libdb4.4-dev, but fails with 
libdb4.4-dev (
libdb3/stable uptodate 3.2.9-22
libdb4.3/testing uptodate 4.3.29-6
libdb4.4/testing uptodate 4.4.20-3
libdb4.2/stable uptodate 4.2.52-18
libdb4.4-dev/testing uptodate 4.4.20-3
)

strace on it shows:
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or 
directory)
open("/usr/lib/libdb-4.3.so", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\220o\1"..., 
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=928628, ...}) = 0
mmap2(NULL, 932188, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 
0) = 0xa7eb1000
mmap2(0xa7f92000, 12288, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe0) = 0xa7f92000
close(3)                                = 0
It appears that it still uses libdb-4.3 (unless I'm very much off 
reading the output for strace)

In conclusion:
- if php is built with libdb4.4-dev then it will fail, otherwise not.

If you required more info about my system please ask.

Mircea









More information about the pkg-php-maint mailing list