From: Alan H. <al...@em...> - 2005-04-18 19:07:26
|
On Mon, 18 Apr 2005 at 20:02, Reini Urban wrote: >> lib/DbaDatabase.php:54: Error[256]: >> dba_open(/home/alanh/html/wiki/pages/pagedb.gdbm,c): Driver initialization >> failed for handler: gdbm: File open error >> file: /home/alanh/html/wiki/pages/pagedb.gdbm >> mode: c >> handler: gdbm >> >> Any suggestions as to what to try? > > Yes, > see the current sozurce of lib/DbaDatabase.php what I had to do to workaround > gdbm bugs. > if "c" fails try "w" with the second try. > Only Windows needs "-" Hi Reini, I'm looking at the version of DbaDatabase.php that was included in phpwiki-1.3.11_rc1 and I don't understand quite what you mean. I see the following code fragment on lines 46-53: 46 if (check_php_version(4,3,0) and (strlen($mode) == 1)) { 47 // PHP 4.3.x Windows lock bug workaround: http://bugs.php.net/bug.php?id=239 47 75 48 if (isWindows()) { 49 $mode .= "-"; // suppress locking, or 50 } elseif ($this->_handler != 'gdbm') { // gdbm does it internally 51 $mode .= "d"; // else use internal locking 52 } 53 } 54 while (($dbh = dba_open($this->_file, $mode, $this->_handler)) < 1) { 55 if ($watchdog <= 0) 56 break; 57 flush(); 58 // "c" failed, try "w" instead. 59 if (substr($mode,0,1) == "c" and file_exists($this->_file)) 60 $mode = "w"; But I don't see what I should change in here in order to make it work. I don't see where $mode ever gets set to "c" and how I can make any changes to make it work.... -- Alan Hoyle - al...@un... - http://www.alanhoyle.com/ "I don't want the world, I just want your half." -TMBG Get Horizontal, Play Ultimate. |