This is leena  from pune.  

I want to use berkeley db with PHP 4. I have installed php extension of
berkeley DB on my linux machine. (berkeley db version -  4.3.28 ) 

I have gone through php extension classes.

However I m not able to create database with the help of those classes.
[ Please take a note that I am not in favor of using php inbuilt dbm
style functions as it does not allow to specify access mothods + not
fit in my requirements.  Anyone know which default method it uses?? ] 

Here goes my code - [ without creating environment as I am  not able to
create environment with DB4Env class, it givens segmentation error] 

/* --------------  */ 
$db = new Db4(null); 
$db->open(null,"/tmp/test1.db"-, "test", DB_CREATE, 0666);   // Get the
current value of "counter" 
$counter = $db->get("counter"); 
print "Counter Value is $counter"; 
$db->put("counter", 5);  // put() is not availebale in DB4 still not
giving error ??? 
/* -------------- */ 

This program is neither giving error nor creating .db file 

How to get out of this? Is there any php application uses berkeley DB?
Better to using PHP 5 ?  

Could any one sugesst links or sites where can I get code snippets of
php and Berkeley  DB? 

Thanks for the help in advance.


PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to