ID: 29455 User updated by: dada at bbs dot giga dot net dot tw Reported By: dada at bbs dot giga dot net dot tw Status: Open Bug Type: *Compile Issues Operating System: FreeBSD PHP Version: 5.0.0 Assigned To: helly New Comment:
The deprecated DBM extension seems using 'ndbm' in FreeBSD (instead of built-in db library) for accessing Berkeley DB 1.85 format in BSD system. 1. Deprecated DBM extension use ndbm's dbm_open() in FreeBSD's /usr/include/ndbm.h 2. my solution use dbopen() in FreeBSD's /usr/include/db.h Both works! My codes use the 2nd solution to support db 1.85 format. Maybe you can barrow the codes from the deprecated DBM extension to utilize the 1st solution to support the Berkeley DB 1.85 format in FreeBSD. This may increase the portability. ~ dada Previous Comments: ------------------------------------------------------------------------ [2004-08-05 04:05:21] dada at bbs dot giga dot net dot tw I just send the modified source to you. Thanks. ------------------------------------------------------------------------ [2004-08-05 00:37:40] [EMAIL PROTECTED] Please send me your handler file. I'll see what to do next. And thanks for your patience and very much for your efforts in helping. ------------------------------------------------------------------------ [2004-08-04 12:49:32] dada at bbs dot giga dot net dot tw The DBM is not the database format, but the API interface. So the 'support for DBM handler' may be confused. The PHP source use gdbm's dbm (api) emulation as underlying library to build DBM handler support in DBA. But the resulting database format for this kind of 'dbm' handler does NOT compatible with FreeBSD's built-in DB format. FreeBSD has its built-in database format (libc) which been used in the system everywhere, such as /etc/mail/aliases.db. In fact, FreeBSD/db's format is the same as 'Berkeley DB 1.85' So my question becomes: How to access 'Berkeley DB 1.85' by DBA extension ? -or- How to build 'dbm' handler with FreeBSD/db as underlying library ? The deprecated PHP dbm_* extension can open 'Berkeley DB 1.85' in FreeBSD. But this should be replaced by DBA. The codes in PHP/ext/dba/dba_dbm.c does not compatiable with the API of FreeBSD's db library. I decided to fix this myself. I rewrite the PHP/ext/dba/dba_dbm.c today, and it can be build with FreeBSD/db. It now runs perfectly. But I think this should be called as 'db1' handler. The codes can only be compiled in FreeBSD. I don't know if you would like to add this into PHP CVS. I'll be glad if I can contribute my codes. Thanks for your patience on the report and tolerate my poor english. ------------------------------------------------------------------------ [2004-08-02 13:20:45] [EMAIL PROTECTED] Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. ------------------------------------------------------------------------ [2004-07-30 09:13:08] dada at bbs dot giga dot net dot tw Description: ------------ Yes, it's related to Bug #28384. Since DBM extension is deprecated. I need the DBM handler (Berkeley DB 1.85) support of DBA extension. (ex: dba_open( 'index.db', 'n', 'dbm' ) ) FreeBSD has its own built-in DBM library, which is Berkeley DB 1.85. But I can not build DBA extension with FreeBSD's DBM. The DBM support can not be auto-detected by the configure script. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29455&edit=1