ID:               21743
 Updated by:       [EMAIL PROTECTED]
 Reported By:      priyadi at priyadi dot net
-Status:           Feedback
+Status:           No Feedback
 Bug Type:         DBM/DBA related
 Operating System: RedHat Linux 7.2
 PHP Version:      4.3.0
 Assigned To:      helly
 New Comment:

No feedback was provided for this bug for over 2 weeks, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".


Previous Comments:
------------------------------------------------------------------------

[2003-02-22 05:14:04] [EMAIL PROTECTED]

To priyadi:
 - (1) strange, maybe you can send me a strace outut
       but not on the list to [EMAIL PROTECTED] is enough.
 - (4) if the file uses another db layout (e.g. different
       major release) you will have to updragde the file.
       But you should have received an errormessage which
       informs about that.

To rmallet:
 This is intereseting. I suspect more a problem with the
 way php locks the file since we do not use the locking
 facilities of the library. So the output of strace would
 help, again to [EMAIL PROTECTED] is enough.

------------------------------------------------------------------------

[2003-02-21 13:01:37] rmallett at ccs dot carleton dot ca

I encountered the same problem on a Sun Solaris 8 system running
apache-1.3.27 and with php 4.3.0 installed as an
apache module with dba enabled and db-4.1.25 available as db3, and
adding the "-" to the mode flag (c or n) as per your suggestion
([EMAIL PROTECTED]) fixed the problem so it looks like the theory that its
a locking problem is right. 

Anything I should try to help you to fix the problem? I was using the
simple example from the PHP manual for testing BTW; that is,

<?php
 $id = dba_open ("/tmp/test.db", "n", "db3");

 if (!$id) {
     echo "dba_open failed\n";
     exit;
 }

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

 if (dba_exists ("key", $id)) {
     echo dba_fetch ("key", $id);
     dba_delete ("key", $id);
 }

 dba_close ($id);

?>

which gives the "Driver initialization failed ..." but
which works with "n-".

------------------------------------------------------------------------

[2003-02-06 09:29:39] priyadi at priyadi dot net

Hello, sorry for not responding for so long. I have 
another observation to this elusive problem. 
 
- It fails when using mode 'c' but the file doesn't exist 
already 
- It succeeds when using mode 'n' and the file doesn't 
already exist 
- It succeeds when using mode 'c' and the file exists and 
it is a valid db3 btree 
- It fails when using mode 'c' and the file exists but it 
is not a valid db3 btree 
 
Regarding db4 version, I lost access to the system but I 
think it is version 4.0.14.

------------------------------------------------------------------------

[2003-01-31 01:28:04] [EMAIL PROTECTED]

Please update: ext/dba/config.m4

This fixes some problems when linking against a specific
library version. If you do not use your systems default
db library you must not include ndbm support since that
is based on db1 which in turn is db-1.85 or based on db-x
where x is 1.85 or x >= 2.

I tried the following:
- db-3.2 (not shared) and it works.
- db-4.1.25 (shared/not shared) and it works.
- db-3.3 from system rpm (not shared) and it works.
- db-3.3 from source (shared) and it works

So i will ask sleepycat for known problems and maybe
disable shared dba in case of db-3.2.

I missed to answer your question: db libraries *can*
do file locking but we tell the library not to do so and 
use our own locking.

To unalize your db4 problems: What extact version are you 
using (ldd) and which config (but ldd should be enough).

------------------------------------------------------------------------

[2003-01-30 11:38:18] priyadi at priyadi dot net

I also encountered segfaults with db4 compiled with 
--with-db3=dir but not with db3 supplied by redhat.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/21743

-- 
Edit this bug report at http://bugs.php.net/?id=21743&edit=1

Reply via email to