REATE TABLE wikiscore (
pagename VARCHAR(100) NOT NULL,
score INT NOT NULL DEFAULT 0,
PRIMARY KEY (pagename)
);
Step 3. Configure PhpWiki.
Next, you have to edit the config.php file in the C:\PostgresPlus\8.3\apache\htdocs\phpwiki\lib directory.
You'll need to make 2 edits, the first is that you need to change the variable WhichDatabase from 'default' to 'pgsql'. It's easy to do, just search for the comment box labeled Part Two: Database section, and edit the line that says $WhichDatabase =
Part Two:
Database section
// set your database here and edit the according section below.
// For PHP 4.0.4 and later you must use "dba" if you are using
// DBM files for storage. "dbm" uses the older deprecated
// interface.
// The option 'default' will choose either dbm or dba, depending
// on
// the version of PHP you are running.
$WhichDatabase = 'pgsql'; // use one of "dbm", "dba", "mysql",
// "pgsql", "msql", "mssql", or "file"
The second edit is that you have to tell PhpWiki how to connect to this database. Again, this is easy, you simply enter the information that you used to create the database and user earlier.
// PostgreSQL settings -- see INSTALL.pgsql for more details
} elseif ($WhichDatabase == 'pgsql') {
$pg_dbhost = "localhost";
$pg_dbport = "5432";
$pg_dbuser = "phpwiki"; // username as used in step 2 of
INSTALL.mysql
$pg_dbpass = "*******"; // password of above user
$WikiDataBase = "wiki"; // name of the database in Postgresql
$WikiPageStore = "wiki";
$ArchivePageStore = "archive";
$WikiLinksPageStore = "wikilinks";
$HotTopicsPageStore = "hottopics";
$HitCountPageStore = "hitcount";
include "lib/pgsql.php";