From: Zot O'C. <zo...@wh...> - 2003-01-10 19:19:04
|
Just a quick note. I tested with postgres and it works there, so this is a DBM issue. I put a bunch of prints in, and I see where the initial create is called: It seems that 48 function WikiUser ($userid = false, $authlevel = false) { 49 print "lib/WikiUser.php: top new WikiUser <BR>\n"; 50 $this->_request = &$GLOBALS['request']; 51 print "lib/WikiUser.php: before getDb $this->_request <BR>\n"; Calling request calls forces the getDbh, which forces the open with a 'c'. Then in libn/main .php the deflower line forces the second one. 717 print "lib/main.php: main: before possiblyDeflowerVirginWiki <BR>\n"; 718 $request->possiblyDeflowerVirginWiki(); 719 print "lib/main.php: main: after possiblyDeflowerVirginWiki <BR>\n"; index.php: before main lib/main.php: main: before main() lib/main.php: main: before new WikiRequest(); lib/main.php: WikiRequest:top lib/main.php: WikiRequest: before Request lib/Request.php:240: Warning[2]: Cannot send session cache limiter - headers already sent (output started at /home/httpd/html/wiki/clients/plug/index.php:657) lib/main.php: WikiRequest: after Request lib/main.php: WikiRequest: User lib/WikiUser.php: top new WikiUser lib/WikiUser.php: before getDb Object lib/main.php: getDbh !isset /nlib/WikiDB.php: open new WikiDB_dba lib/WikiDB/dba.php: in WikiDB_dba lib/WikiDB/backend/dba.php: before open Zot: this->_file /tmp/wiki_pagedb.gdbm, mode c, this->_handler gdbmlib/WikiDB/backend/dbaBase.php: new in WikiDB_backend_dbaBase lib/WikiUser.php: before isa user lib/WikiUser.php: bottom new WikiUser lib/main.php: WikiRequest: getPreferences lib/main.php: WikiRequest: end lib/main.php: main: before request->updateAuthAndPrefs() lib/WikiUser.php:284: Warning[2]: Cannot add header information - headers already sent by (output started at /home/httpd/html/wiki/clients/plug/index.php:657) lib/main.php: main: before possiblyDeflowerVirginWiki lib/main.php: getDbh !isset /nlib/WikiDB.php: open new WikiDB_dba lib/WikiDB/dba.php: in WikiDB_dba lib/WikiDB/backend/dba.php: before open Zot: this->_file /tmp/wiki_pagedb.gdbm, mode c, this->_handler gdbm ------------------------------------------- When this debuged to pgsql, index.php: before main lib/main.php: main: before main() lib/main.php: main: before new WikiRequest(); lib/main.php: WikiRequest:top lib/main.php: WikiRequest: before Request lib/Request.php:240: Warning[2]: Cannot send session cache limiter - headers already sent (output started at /home/httpd/html/wiki/clients/plug/index.php:658) lib/main.php: WikiRequest: after Request lib/main.php: WikiRequest: User lib/WikiUser.php: top new WikiUser lib/WikiUser.php: before getDb Object lib/main.php: getDbh !isset /nlib/WikiDB.php: open new WikiDB_SQL lib/WikiUser.php: before isa user lib/WikiUser.php: bottom new WikiUser lib/main.php: WikiRequest: getPreferences lib/main.php: WikiRequest: end lib/main.php: main: before request->updateAuthAndPrefs() lib/WikiUser.php:284: Warning[2]: Cannot add header information - headers already sent by (output started at /home/httpd/html/wiki/clients/plug/index.php:658) lib/main.php: main: before possiblyDeflowerVirginWiki lib/main.php: getDbh !isset /nlib/WikiDB.php: open new WikiDB_SQL lib/WikiUser.php: top new WikiUser lib/WikiUser.php: before getDb Object lib/WikiUser.php: before isa user lib/WikiUser.php: bottom new WikiUser ... Loading up virgin wiki ... (HTML) On Thu, 2003-01-09 at 19:39, Zot O'Connor wrote: > 1.3.4 is not installing with dbm. > > I have 6-9 1.3.3 installs working, so something has changed. > > I get the dreaded: > lib/DbaDatabase.php:32: Fatal[256]: driver initialization > failed > > I tried the local subdir, /tmp etc. > > I think the problem is two attempts to create the file: > > -rw-r--r-- 1 nobody nobody 12288 Jan 9 19:32 > /tmp/wiki_pagedb.gdbm > > Adding a debug line in lib/config.php > > 30 $this->_dba_open_error = false; > 31 $ErrorManager->pushErrorHandler(new > WikiMethodCb($this, '_dba_open_error_handler')); > 32 print "Zot: this->_file $this->_file, mode $mode, > this->_handler $this->_handler"; > 33 while (($dbh = dba_open($this->_file, > $mode, $this->_handler)) < 1) { > > I see: > Zot: this->_file /tmp/wiki_pagedb.gdbm, mode c, > this->_handler gdbmZot: this->_file /tmp/wiki_pagedb.gdbm, > mode c, this->_handler gdbm > > [pause] > lib/DbaDatabase.php:33: Fatal[256]: driver initialization > failed > > ls -l /tmp/w* > -rw-r--r-- 1 nobody nobody 12288 Jan 9 19:34 > /tmp/wiki_pagedb.gdbm > > So I assume mode='c' is asking to create the file. Since > there are two calls, I assume it is getting the request twice. > > Doing diff from 1.3.3 to 1.3.4 show no changes in the > lib/Dba*php files. > > So, has anyone else made this work with dbm yet. Given > this and the error below, I kinda doubt it. > > > > > BTW there is an error in the assumptions on startup: > > if (ALLOW_USER_LOGIN and empty($DBAuthParams['auth_dsn']) > and empty($DBAuthParams['auth_user_file'])) { > $DBAuthParams['auth_dsn'] = $DBParams['dsn']; > } > > > This never checked if 'dns' was set. Since I am running > dbm, this has no purpose. The index.php by default tries > to set this. > > Versions: > php-4.0.4pl1-9 > apache-1.3.14-2.6.2 -- Zot O'Connor http://www.ZotConsulting.com http://www.WhiteKnightHackers.com |