Page 1 of 1

db4 "c" option problem with PHP 4.3.2

Posted: Thu Jul 03, 2003 3:35 am
by johnh75
Hi, I have successfully compiled and installed BerkeleyDB.4.0 on Solaris 8. I have successfully compiled and installed PHP 4.3.2 with Apache 1.3.27 on the same system and all is well except...

Problem:
I am using the following statement to open a new database that currently doesn't exist on disk.

$id = dba_open ("file.db", "c" , "db4", 0640);

If I open with option "c" I am unable to immediatley write. I receive a
uable to open db message.
If I open with option "n" I can write immediatly but the "n" option
truncates the database as I understand it loosing all previous data.
Providing "0640" as permissions for database creation still results in the
default 644 permission being apllied.

Resolution:

For the moment I'm testing for the db file existinence and opening with
option "n" if the file does not exist.

The permissions I am living with but unhappy about.


Help!