From: Tim B. <tim...@wc...> - 2002-01-17 17:59:57
|
The wiki is showing signs of life now. I can see it from other computers and it shows signs of wanting to talk to the postgresql database I created for it. I did copy the wiki_pagedb.gdbm to a pages dir that I created and did a chmod 777 on them. The complete error goes like this... lib/WikiDB/backend/PearDB.php:27: Fatal[256]: Can't connect to database: wikidb_backend_pgsql: fatal database error DB Error: connect failed (pgsql://tim:********@xxx.xxx.xxx.xxx/wiki) (I replaced the password with asterisks and the ip address with x's - company policy) All suggestions, solutions, clues, inuendo, and rumors are eagerly anticipated and appreciated. TIA, Tim B. |
From: Jeff D. <da...@da...> - 2002-01-17 18:07:15
|
Tim Bogart said: > I did copy the wiki_pagedb.gdbm to a pages > dir that I created and did a chmod 777 on them. (Of course, that's only used by the DBA backend, and so has nothing to do with postgres...) > The complete error goes like this... > > lib/WikiDB/backend/PearDB.php:27: Fatal[256]: Can't connect to > database: wikidb_backend_pgsql: fatal database error > > DB Error: connect failed > (pgsql://tim:********@xxx.xxx.xxx.xxx/wiki) Hmmm. Can you connect from the command line? I'm not a postgres expert, but I think the command for that would be: psql -h xxx.xxx.xxx.xxx -W wiki tim |
From: Tim B. <tim...@wc...> - 2002-01-17 18:17:11
|
okay...that made a difference. Changed the symptom to something a little less clear to me. Here it is... --------------------- lib/WikiDB/backend/PearDB.php:27: Fatal[256]: Can't connect to database: wikidb_backend_peardb: fatal database error DB Error: not found WikiFatalError lib/WikiDB/backend/PearDB.php:27: Fatal[256]: Can't connect to database: wikidb_backend_peardb: fatal database error DB Error: not found () ------------------------------ More suggestions are encouraged and wildly anticipated. TIA Tim B. On Thursday 17 January 2002 01:07 pm, Jeff Dairiki wrote: > Tim Bogart said: > > I did copy the wiki_pagedb.gdbm to a pages > > dir that I created and did a chmod 777 on them. > > (Of course, that's only used by the DBA backend, > and so has nothing to do with postgres...) > > > The complete error goes like this... > > > > lib/WikiDB/backend/PearDB.php:27: Fatal[256]: Can't connect to > > database: wikidb_backend_pgsql: fatal database error > > > > DB Error: connect failed > > (pgsql://tim:********@xxx.xxx.xxx.xxx/wiki) > > Hmmm. Can you connect from the command line? > > I'm not a postgres expert, but I think the command for that would be: > > psql -h xxx.xxx.xxx.xxx -W wiki tim > > > > > _______________________________________________ > Phpwiki-talk mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwiki-talk |
From: Tim B. <tim...@wc...> - 2002-01-17 19:07:52
|
Additional info ...here's a copy of the database section of my index.php // This array holds the parameters which select the database to use. // // Not all of these parameters are used by any particular DB backend. // $DBParams = array( // Select the database type: //'dbtype' => 'SQL', 'dbtype' => 'SQL', // For SQL based backends, specify the database as a DSN // The most general form of a DSN looks like: // // phptype(dbsyntax)://username:password@protocol+hostspec/database // // For a MySQL database, the following should work: // // mysql://user:password@host/databasename // // FIXME: My version Pear::DB seems to be broken enough that there is // no way to connect to a mysql server over a socket right now. //'dsn' => 'mysql://guest@:/var/lib/mysql/mysql.sock/test', //'dsn' => 'mysql://guest@localhost/test', 'dsn' => 'pgsql -h 166.32.201.228 -W wiki tim', // Used by all DB types: // prefix for filenames or table names /* * currently you MUST EDIT THE SQL file too (in the schemas/ directory * because we aren't doing on the fly sql generation during the * installation. */ // 'prefix' => 'phpwiki_' // Used by 'dba' 'directory' => "/tmp", 'dba_handler' => 'gdbm', // Either of 'gdbm' or 'db2' work great for me //'dba_handler' => 'db2', //dba_handler' => 'db3', 'timeout' => 20, //'timeout' => 5 ); Thanks, Tim B. ----------------------------------------------- On Thursday 17 January 2002 01:42 pm, Tim Bogart wrote: > okay...that made a difference. Changed the symptom to something a little > less clear to me. Here it is... > > --------------------- > > DB Error: not found > > WikiFatalError > > lib/WikiDB/backend/PearDB.php:27: Fatal[256]: Can't connect to database: > wikidb_backend_peardb: fatal database error > > DB Error: not found > () > ------------------------------ > > More suggestions are encouraged and wildly anticipated. > > TIA > > Tim B. > > On Thursday 17 January 2002 01:07 pm, Jeff Dairiki wrote: > > Tim Bogart said: > > > I did copy the wiki_pagedb.gdbm to a pages > > > dir that I created and did a chmod 777 on them. > > > > (Of course, that's only used by the DBA backend, > > and so has nothing to do with postgres...) > > > > > The complete error goes like this... > > > > > > lib/WikiDB/backend/PearDB.php:27: Fatal[256]: Can't connect to > > > database: wikidb_backend_pgsql: fatal database error > > > > > > DB Error: connect failed > > > (pgsql://tim:********@xxx.xxx.xxx.xxx/wiki) > > > > Hmmm. Can you connect from the command line? > > > > I'm not a postgres expert, but I think the command for that would be: > > > > psql -h xxx.xxx.xxx.xxx -W wiki tim > > > > > > > > > > _______________________________________________ > > Phpwiki-talk mailing list > > Php...@li... > > https://lists.sourceforge.net/lists/listinfo/phpwiki-talk > > _______________________________________________ > Phpwiki-talk mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwiki-talk |
From: Jeff D. <da...@da...> - 2002-01-17 19:38:41
|
Tim Bogart said: > //'dsn' => 'mysql://guest@:/var/lib/mysql/mysql.sock/test', > //'dsn' => 'mysql://guest@localhost/test', > 'dsn' => 'pgsql -h 166.32.201.228 -W wiki tim', "What we have heah ... is a FAILyuh to comMUNicate..." Psql (not pgsql) is a command-line utility which can be used to talk to a postgres database. I was suggesting using it as a sanity check to make sure your database/server is set up correctly. (If possible,) log in to the machine your HTTP server is running on, then at a shell prompt try the suggested command. (Also 'man psql' for more info.) (Your original DSN in index.php looked okay, so put that back the way it was.) Sorry for the confusion. |
From: Tim B. <tim...@wc...> - 2002-01-17 21:04:48
|
Ah Hah! My db server is not set up properly. In short the postmaster is not running with the -i option. I tried to edit the /var/init.d/postgres file to include it but the service fails to restart no matter where I try to put the thing. The whole line looks like this... su -l postgres -s su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -D $PGDATA -p /usr/bin/postmaster start > /dev/null 2>&1" < /dev/null I've tried it here... su -l postgres -s su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -D $PGDATA -pi /usr/bin/postmaster start > /dev/null 2>&1" < /dev/null I've tried it here... su -l postgres -s su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -D $PGDATA -p -i /usr/bin/postmaster start > /dev/null 2>&1" < /dev/null I've tried it here... su -l postgres -s su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -D $PGDATA -i /usr/bin/postmaster start > /dev/null 2>&1" < /dev/null and the service fails to start. Any suggestions? > > (If possible,) log in to the machine your HTTP server is running on, then > at a shell prompt try the suggested command. (Also 'man psql' for more > info.) > > (Your original DSN in index.php looked okay, so put that back the way it > was.) > Sorry for the confusion. > > > > > > _______________________________________________ > Phpwiki-talk mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwiki-talk |
From: Jeff D. <da...@da...> - 2002-01-17 21:19:19
|
Tim Bogart said: > Ah Hah! My db server is not set up properly. In short the postmaster > is not running with the -i option. I tried to edit the > /var/init.d/postgres file to include it but the service fails to > restart no matter where I try to put the thing. I the db server running on a different host than the HTTP server? If not, there may be a way to avoid the -i. (Using -i may have security implications...) > The whole line looks like this... > > su -l postgres -s /bin/sh -c > "/usr/bin/pg_ctl -D $PGDATA -p /usr/bin/postmaster start > /dev/null > 2>&1" < /dev/null Here, you are running pg_ctl which in turn runs postmaster. (Actually, your are running su, which in turn runs /bin/sh which in turn runs pg_ctl, which finally runs postmaster...) In any case, to get pg_ctl to pass options to postmaster you need to use the -o option (to pg_ctl). So something like: su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -D $PGDATA -o '-i' -p /usr/bin/postmaster start > /dev/null 2>&1" < /dev/null might work. (It's just a guess though.) |
From: Tim B. <tim...@wc...> - 2002-01-18 17:54:33
|
I think I'm a little closer to success. I've tweaked the index.php database section and have been able to modify the error I'm getting to... Fatal error: Cannot instantiate non-existent class: wikidb_backend_psql in /var/www/html/phpwiki/lib/WikiDB/SQL.php on line 17 That line of code says ... $backend = new $backend_class($dbparams); Any more clues? Anyone? Tim On Thursday 17 January 2002 04:19 pm, Jeff Dairiki wrote: > Tim Bogart said: > > Ah Hah! My db server is not set up properly. In short the postmaster > > is not running with the -i option. I tried to edit the > > /var/init.d/postgres file to include it but the service fails to > > restart no matter where I try to put the thing. > > I the db server running on a different host than the HTTP server? > If not, there may be a way to avoid the -i. (Using -i may have > security implications...) > > > The whole line looks like this... > > > > su -l postgres -s /bin/sh -c > > "/usr/bin/pg_ctl -D $PGDATA -p /usr/bin/postmaster start > /dev/null > > 2>&1" < /dev/null > > Here, you are running pg_ctl which in turn runs postmaster. (Actually, > your are running su, which in turn runs /bin/sh which in turn runs pg_ctl, > which finally runs postmaster...) > > In any case, to get pg_ctl to pass options to postmaster you need to use > the -o option (to pg_ctl). So something like: > > su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -D $PGDATA -o '-i' -p > /usr/bin/postmaster start > /dev/null 2>&1" < /dev/null > > might work. (It's just a guess though.) > > > > > _______________________________________________ > Phpwiki-talk mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwiki-talk |
From: Jeff D. <da...@da...> - 2002-01-18 18:04:32
|
On Fri, 18 Jan 2002 13:19:48 -0500 "Tim Bogart" <tim...@wc...> wrote: > Fatal error: Cannot instantiate non-existent class: wikidb_backend_psql in > /var/www/html/phpwiki/lib/WikiDB/SQL.php on line 17 > > Any more clues? Anyone? I think you have 'psql:' in the DSN where you need 'pgsql:'. |