php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11700 db2 driver initialization failed
Submitted: 2001-06-26 11:00 UTC Modified: 2002-01-02 13:56 UTC
From: rpavonar at cisco dot com Assigned:
Status: Closed Package: DBM/DBA related
PHP Version: 4.0.6 OS: RedHat 6.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rpavonar at cisco dot com
New email:
PHP Version: OS:

 

 [2001-06-26 11:00 UTC] 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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-12 04:12 UTC] yohgaki@php.net
Do you still have problem with 4.1.0?
 [2001-12-12 04:13 UTC] yohgaki@php.net
Status = Feedback
 [2002-01-02 13:56 UTC] lobbin@php.net
No feedback. Closing.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 14:01:28 2024 UTC