helly Sun Nov 10 17:07:17 2002 EDT Modified files: /php4/ext/dba/tests dba_handler.inc Log: Use 'l' to open database file with locking on .lck file. Index: php4/ext/dba/tests/dba_handler.inc diff -u php4/ext/dba/tests/dba_handler.inc:1.4 php4/ext/dba/tests/dba_handler.inc:1.5 --- php4/ext/dba/tests/dba_handler.inc:1.4 Thu Nov 7 09:18:42 2002 +++ php4/ext/dba/tests/dba_handler.inc Sun Nov 10 17:07:17 2002 @@ -1,6 +1,7 @@ <?php echo "database handler: $handler\n"; - if (($db_file=dba_open($db_filename, "n", $handler))!==FALSE) { + @unlink($db_filename); + if (($db_file = @dba_open($db_filename, "nl", $handler))!==FALSE) { dba_insert("key1", "Content String 1", $db_file); dba_insert("key2", "Content String 2", $db_file); dba_insert("key3", "Third Content String", $db_file); @@ -26,8 +27,8 @@ } else { echo "Error creating database\n"; } - $db_writer=dba_open($db_filename, "w", $handler); - if (($dba_reader=dba_open($db_filename, "r", $handler))===false) { + $db_writer = @dba_open($db_filename, "wl", $handler); + if (($dba_reader = @dba_open($db_filename, "rlt", $handler))===false) { echo "Cannot read during write operation\n"; } else { echo "Read during write permitted\n"; @@ -43,7 +44,7 @@ } else { die("Error reopening database\n"); } - if (($db_file=dba_open($db_filename, "r", $handler))!==FALSE) { + if (($db_file = @dba_open($db_filename, "rd", $handler))!==FALSE) { $key = dba_firstkey($db_file); $res = array(); while($key) {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php