how to enable db4 support in PHP7

[FONT=inherit][FONT=inherit][FONT=inherit][FONT=inherit]I recently upgrade to SuSE Leap 15 and PHP7. everything works fine, but there is no db4 support in PHP7, more generally only handlers cdb, inifile and flatfile are availible. commandline utilitys are installed.

Is there any way to activate db4 handler in PHP7 without recompiling PHP7?

DBA handlers shown by the following php code:
cdb: 0.75 cdb_make: 0.75 inifile: 1.0 flatfile: 1.0

echo "Available DBA handlers:
foreach (dba_handlers(true) as $handler_name => $handler_version) {
  // clean the versions
  $handler_version = str_replace('$', '', $handler_version);
  echo " - $handler_name: $handler_version


I don’t/haven’t used Oracle db specifically,
But from its description seems to be a simple key/value pair database.

Maybe inspecting the available db helpers and switch/upgrade to whatever might be supported (if an alternative exists)?
Key/value pair databases are simple things, I’d imagine there might be a simple upgrade to another Oracle db which if possible might not require any modifications to the code that insert/retrieves data.

So, for instance according to the following, if you’re not updating any records (only create and retrieve), cdb_make might work for you

In any case, I’d think that the PHP7 available from openSUSE should support more db handlers than what you list…
Recommend submitting a “feature request” to to support more db handlers, perhaps including db4.


PHP in SLE15 and Leap15 was built without --with-db4=%{_usr} hence DB4 is not available.

Requires rebuilding PHP or finding someone on OBS whose PHP has db4 built in.

you both confirmed my assumptions, for now I use flatfile, even its not recommended.

but not having the dbX handlers or a similar alternative is a big downside, because most users of db-open will break.
in addition its no more possible to acces the key/value databases used e.g. by postfix or amavis.

may be I file a Feature request to provide more handlers.


done …

its fixed, with the next package update berkdb support is back :wink:

Wow, and all this in 2 days time. We rock!!!

I might even look into using an Oracle Berkeley db (not to be confused with the relational database) in an upcoming project.
Seems like a really interesting, lightweight key/value pair db that could be sufficient instead of something like redis and memcache which I’ve been doing…