|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8231 db2 driver for dba not working
Submitted: 2000-12-13 10:04 UTC Modified: 2000-12-21 18:27 UTC
From: cech at debian dot org Assigned:
Status: Closed Package: DBM/DBA related
PHP Version: 4.0 Latest CVS (13/12/2000) OS: Debian GNU/Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: cech at debian dot org
New email:
PHP Version: OS:


 [2000-12-13 10:04 UTC] cech at debian dot org

it has been reported to me, that the db2 driver for dba_ does not work in RC4.

I've tried also RC5 with the same results. But ndbm and gdbm drivers work OK.

The configure line is 

--with-apxs=/usr/bin/apxs --with-db2 --with-ndbm

Petr Cech


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-15 08:58 UTC]
Works for me just fine. Could you specify what
doesn't work? And a sample script would be nice 
to have too..

 [2000-12-18 04:21 UTC] cech at debian dot org

it's still happening. I've tried and packaged RC6 and it doesn't seem

to work with glibc 2.2 and LFS perhaps.


        $dbh = dba_open("/tmp/test.db2","c","db2");

   if(!$dbh) {

      echo "dba_open failed\n";



   dba_replace ("key", "This is an example!", $dbh);

   if (dba_exists ("key", $dbh)) {

      echo dba_fetch ("key", $dbh);

      dba_delete ("key", $dbh);


   dba_close ($dbh);


 [2000-12-19 20:54 UTC]
Does it get compiled in? ie. What does phpinfo() say about it?
Does the script print out any error messages? 

 [2000-12-20 10:21 UTC] cech at debian dot org
phpinfo() says it knows db2 and ndbm backends. The ndbm

works OK, but db2 doesn't.

   Warning: driver initialization failed in /home/cech/WWW/php4/test-db2.php on line 2

   dba_open failed

It creates an empty .db file and that's all. Normal C programs

work with db2 as expected.

Petr Cech
 [2000-12-20 19:10 UTC]
I compiled ndbm support into my test bed and this still works just fine for
me.  What is the version of db2 you're using?

Are there any errors in log files?

 [2000-12-21 18:13 UTC] cech at debian dot org

I didn't want to imply, that ndbm has some impact on db2. Only note,

that other DBA drivers work.

No. there is nothing in the error logs. 4.0.3pl1 worked OK. Maybe it's just libraries. I'll try to investigate more, but probably

after holidays.

Petr Cech
 [2000-12-21 18:27 UTC] cech at debian dot org

I've found out the problem. Apache and php4 were using different

DB2 libraries - one from glibc and the other Sleepycat one.  After recompiling apache

it's all OK.


Petr Cech
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jun 18 12:01:29 2024 UTC