php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11732 db3 driver initialization failed
Submitted: 2001-06-27 07:17 UTC Modified: 2002-01-12 02:28 UTC
From: philip at jocks dot to Assigned:
Status: Closed Package: DBM/DBA related
PHP Version: 4.0.6 OS: RedHat 7.1
Private report: No CVE-ID: None
 [2001-06-27 07:17 UTC] philip at jocks dot to
The Apache user has write perms on directory.

script:
if(!$fp = dba_open("test.db", "c", "db3")) {
        print("error");
        exit;
}
dba_insert("testkey", "testval", $fp);
echo( dba_fetch("testkey", $fp));
dba_close($fp);

what is does, is just opening a file "test.db", that has 0 bytes and causing the error 

Warning: driver initialization failed in /path/to/script.php

opening already existant db3 files doesn't work either.

changing the handler from db3 to db2 works fine

configure line: 
./configure --with-apxs=/usr/local/apache/current/bin/apxs --with-mysql=/usr/local/mysql/current --with-zlib --with-ftp --with-jpeg-dir=/usr/local/lib --enable-versioning --enable-track-vars=yes --enable-url-includes --enable-sysvshm=yes --enable-sysvsem=yes --with-config-file-path=/etc --with-db3=/usr/local/BerkeleyDB.3.2 --with-db2=/usr/include/db2 --with-sablot --enable-dbx

i am using sleepycat's BerkeleyDB 3.2.9

hope, that's it

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-27 22:18 UTC] sniper@php.net
This example script works for me just fine with Berkeley DB 3.1.17 so there must be some differences between the 3.1.x and 3.2.x branches.


 [2002-01-12 02:27 UTC] swm@php.net
Fixed in current CVS.
 [2002-01-12 02:28 UTC] swm@php.net
Closed
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Jul 22 04:01:25 2019 UTC