From:             [EMAIL PROTECTED]
Operating system: RedHat 6.2
PHP version:      4.0.6
PHP Bug Type:     DBM/DBA related
Bug description:  db2 driver initialization failed

I read the other bug reports. Apache user has write permission to the directory 
containing the db2 file. I have db2 support compiled in:

DBA support: enabled
Supported handlers:gdbm db2 

db:This is GDBM version 1.8.0, as of May 19, 1999

config parameters:
./configure --prefix=/usr/local \
--with-apxs=/usr/sbin/apxs \
--enable-track-vars \
--enable-trans-sid \
--enable-versioning \
--enable-apc \
--with-calendar=shared \
--enable-safe-mode \
--with-gdbm=/usr/include \
--with-db=/usr \
--enable-mbstring \
--enable-mbstr-enc-trans \

Using SleepyCat BerkeleyDB 2.7.7.

This script:

$dbmfile= "/tmp/testdb";
$username= "user";
$passwd= "password";
$encpasswd = crypt ($passwd);

$dbh = dba_open($dbmfile, "c", "db2") or die ("Cannot open DB $dbmfile!");
if (!dba_replace($dbh, $username, $encpasswd)) {
        print "Success";
} else {
        print "Failure";

..causes this error:

Warning: driver initialization failed in /home/richpav/php/passwd.php on line 8
Cannot open DB /tmp/testdb!

If tempdb isn't already created (using perl script), PHP creates a 0 byte file 
previous to barfing.

Changing the mode from c to w, r or n has no effect.

I CAN use gdbm with PHP, no problem. 

If you need more info, please let me know.

Edit Bug report at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to