#11700 [Com]: db2 driver initialization failed
| From: | give-oral1757 at hotmail dot com | Date: | Tue, 20 Jul 2004 15:07:38 +0000 |
| Subject: | #11700 [Com]: db2 driver initialization failed | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-62991@lists.php.net to get a copy of this message | ||
ID: 11700
Comment by: give-oral1757 at hotmail dot com
Reported By: rpavonar at cisco dot com
Status: Closed
Bug Type: DBM/DBA related
Operating System: RedHat 6.2
PHP Version: 4.0.6
New Comment:
<a href=http://xxxxxpink-pee-penet.da.ru>oral
give</a>
Previous Comments:
------------------------------------------------------------------------
[2002-01-02 13:56:58] lobbin@php.net
No feedback. Closing.
------------------------------------------------------------------------
[2001-12-12 04:13:06] yohgaki@php.net
Status = Feedback
------------------------------------------------------------------------
[2001-12-12 04:12:23] yohgaki@php.net
Do you still have problem with 4.1.0?
------------------------------------------------------------------------
[2001-06-26 11:00:20] rpavonar at cisco dot com
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
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 \
--with-db2=/usr/local/BerkeleyDB
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";
}
dba_close($dbh);
..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 this bug report at http://bugs.php.net/?id=11700&edit=1