Question

I have to access and write to some berkeley db files that other applications share.

I really haven't found anything out there about using this with PHP. It really doesn't seem very popular.

Does anyone have any links or resources that I might be able to use to get things rolling?

Thanks!

Was it helpful?

Solution

Isn't this what the dba functions are for?
http://php.net/manual/en/book.dba.php

I've had some code some years ago with that. Didn't use it much however, because it was a somewhat inefficient data store. And it seems kind of pointless in the light of SQLite now anyway. But btw: http://schlueters.de/blog/archives/134-Berkeley-DB-5-and-PHP.html

OTHER TIPS

Berkley DB isn't really meant for multi-user access. It is much better for an embedded database that is accessed by one process.

PHP processes run asyncronously on the web site. This means a php script accessing a Berkley DB has to rely on file locking to handle concurrent access.

This is very inefficient. thus no BDB support in php.

If you want to use BDB in a multi-user environment, you should write a web service in perl/c/python/etc that talks to BDB, and accepts connections from php. Or you could just use a real db server like mysql, postgres or something and save yourself the headache.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top