Instalation von phpWiki

Hepatitis

Cadet 3rd Year
Dabei seit
Feb. 2005
Beiträge
45
Hallo Leute,

ich versuche gerade in unserem Intranet zu testzwecken ein Wiki aufzubauen.
___________________________________________________________________

Umgebung:
XAMPP für Windows Version 1.4.3
+ Apache 2.0.49
+ MySQL 4.0.20a
+ PHP 4.3.7 + PEAR
+ mod_php 4.3.7
+ MiniPerl 5.8.3
+ SQLite 2.8.13
+ PHPMyAdmin 2.5.7
+ ADODB 4.21

______________________________________________________________________


Bisher habe ich "phpwiki-1.2.7" ins "htdocs\"-Verzeichniss des Apache entpackt und von dort die Installationsanleitung gestartet.

Anschließend habe ich in der "lib/config.php" die "$ServerAddress" auf meinen domainnamen geändert. Ein zugriff auf http://domainname/phpwiki-1.2.7/ bringt auch das laut Anleitung erwartete Ergebniss (eine Leere Seite).

Mein Problem liegt im Nacästen Teil der Install. Anleitung:

If you get a blank page, PhpWiki tried to open the wrong DBM file
type, most likely. Edit the file lib/config.php and set DBM_FILE_TYPE
to the correct type for your system. 'gdbm' or 'db3' usually work.


Was soll ich da tuen?
In der ( mit dem Editor leider total unformatierten) "lib/config.php" finde ich folgende Passage:

Code:
/////////////////////////////////////////////////////////////////////
   // 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 = 'default'; // use one of "dbm", "dba", "mysql",
                               // "pgsql", "msql", "mssql", or "file"

   if ($WhichDatabase == 'default' and function_exists("dba_open"))
       $WhichDatabase = 'dba';
   if ($WhichDatabase == 'default' and function_exists("dbmopen") 
       and floor(phpversion()) == 3)
       $WhichDatabase = 'dbm';
       
   // DBM and DBA settings (default)
   if ($WhichDatabase == 'dbm' or $WhichDatabase == 'dba' or
       $WhichDatabase == 'default') {
      $DBMdir = "/tmp";
      $WikiPageStore = "wiki";
      $ArchivePageStore = "archive";
      $WikiDB['wiki']      = "$DBMdir/wikipagesdb";
      $WikiDB['archive']   = "$DBMdir/wikiarchivedb";
      $WikiDB['wikilinks'] = "$DBMdir/wikilinksdb";
      $WikiDB['hottopics'] = "$DBMdir/wikihottopicsdb";
      $WikiDB['hitcount']  = "$DBMdir/wikihitcountdb";

      // This is the type of DBA handler for your system. For most Linuxen
      // 'gdbm' is best; 'db2', 'db3' or 'db4' (BerkeleyDB) are another common types. 
      // 'ndbm' appears on Solaris but won't work because it won't store pages larger
      // than 1000 bytes.
      // We do now some smart auto-detection, which will be the best.
      // You can override it by defining DBM_FILE_TYPE earlier.
      if (!defined("DBM_FILE_TYPE")) {
          if (function_exists("dba_handlers")) { // since 4.3.0
              foreach (array('gdbm','db4','db3','db2','sdbm','ndbm') as $handler) {
                  if (in_array($handler, dba_handlers())) {
                      define("DBM_FILE_TYPE", $handler);
                      break;
                  }
              }
          }
      }
      if (!defined("DBM_FILE_TYPE"))
          define("DBM_FILE_TYPE", (substr(PHP_OS,0,3) == 'WIN') ? 'db3' : 'gdbm');

      // time in seconds to try if the dbm is unavailable
      define("MAX_DBM_ATTEMPTS", 20);

      // for PHP3 use dbmlib, else use dbalib for PHP4
      if ($WhichDatabase == 'default') {
         if ( floor(phpversion()) == 3) {
            $WhichDatabase = 'dbm';
         } else {
            $WhichDatabase = 'dba';
         }
      }

      if ($WhichDatabase == 'dbm') {
          include "lib/dbmlib.php"; 
      } else {
          include "lib/dbalib.php";
      }

   // MySQL settings -- see INSTALL.mysql for details on using MySQL
   } elseif ($WhichDatabase == 'mysql') {
      // MySQL server host:
      $mysql_server = 'localhost';

      // username as used in step 2 of INSTALL.mysql:
      $mysql_user = 'wikiuser';

      // password of above user (or leave blank if none):
      $mysql_pwd = '';

      // name of the mysql database
      //  (this used to default to 'wiki' prior to phpwiki-1.2.2)
      $mysql_db = 'phpwiki';

      // Names of the tables.
      // You probably don't need to change these.  If you do change
      // them you will also have to make corresponding changes in
      // schemas/schema.mysql before you initialize the database.
      $WikiPageStore = "wiki";
      $ArchivePageStore = "archive";
      $WikiLinksStore = "wikilinks";
      $WikiScoreStore = "wikiscore";
      $HitCountStore = "hitcount";

      include "lib/mysql.php";

   // PostgreSQL settings -- see INSTALL.pgsql for more details
   } elseif ($WhichDatabase == 'pgsql') {
      $pg_dbhost    = "localhost";
      $pg_dbport    = "5432";
      $pg_dbuser    = "";      // username as used in step 2 of INSTALL.mysql
      $pg_dbpass    = "";      // password of above user (or leave blank if none)	
      $WikiDataBase  = "wiki"; // name of the database in Postgresql
      $WikiPageStore = "wiki";
      $ArchivePageStore = "archive";
      $WikiLinksPageStore = "wikilinks";
      $HotTopicsPageStore = "hottopics";
      $HitCountPageStore = "hitcount";
      include "lib/pgsql.php";

   // MiniSQL (mSQL) settings -- see INSTALL.msql for details on using mSQL
   } elseif ($WhichDatabase == 'msql') {
      $msql_db = "wiki";
      $WikiPageStore = array();
      $ArchivePageStore = array();
      $WikiPageStore['table']         = "wiki";
      $WikiPageStore['page_table']    = "wikipages";
      $ArchivePageStore['table']      = "archive";
      $ArchivePageStore['page_table'] = "archivepages";
      // should be the same as wikipages.line
      define("MSQL_MAX_LINE_LENGTH", 128);
      include "lib/msql.php";

   // Filesystem DB settings
   } elseif ($WhichDatabase == 'file') {
      $DBdir = "/tmp/wiki";
      $WikiPageStore = "wiki";
      $ArchivePageStore = "archive";
      $WikiDB[$WikiPageStore]      = "$DBdir/pages";
      $WikiDB[$ArchivePageStore]   = "$DBdir/archive";
      //$WikiDB['wikilinks'] = "$DBdir/links";
      //$WikiDB['hottopics'] = "$DBdir/hottopics";
      $WikiDB['hitcount']    = "$DBdir/hitcount";
      include "lib/db_filesystem.php";

   // MS SQLServer settings
   } elseif ($WhichDatabase == 'mssql') {
      $WikiPageStore = "wiki";
      $ArchivePageStore = "archive";
      $WikiLinksStore = "wikilinks";
      $WikiScoreStore = "wikiscore";
      $HitCountStore = "hitcount";
      $mssql_server = 'servername';
      $mssql_user = '';
      $mssql_pwd = '';
      $mssql_db = '';
      include "lib/mssql.php";

   } else die("Invalid '\$WhichDatabase' in lib/config.php");


Was muss ich hier ändern?
 

chriskool

Lt. Junior Grade
Dabei seit
Mai 2003
Beiträge
456
Ich würd mal sagen, du musst für $WhichDatabase = 'default'; deine Datenbank eintragen, also z.B. mysql, sowie
PHP:
// MySQL server host:
      $mysql_server = 'localhost';

      // username as used in step 2 of INSTALL.mysql:
      $mysql_user = 'wikiuser';

      // password of above user (or leave blank if none):
      $mysql_pwd = '';

      // name of the mysql database
      //  (this used to default to 'wiki' prior to phpwiki-1.2.2)
      $mysql_db = 'phpwiki';
Deine "Zugangsdaten" zur Datenbank.
 
Zuletzt bearbeitet:

Hepatitis

Cadet 3rd Year
Ersteller dieses Themas
Dabei seit
Feb. 2005
Beiträge
45
Ok,

ich habe jetzt fogende änderungen gemacht:

Code:
$WhichDatabase = 'mysql';

// MySQL server host: 
      $mysql_server = 'localhost'; 

      // username as used in step 2 of INSTALL.mysql: 
      $mysql_user = 'root';  (zu testzwecken am einfachsten)

      // password of above user (or leave blank if none): 
      $mysql_pwd = ''; 

      // name of the mysql database 
      //  (this used to default to 'wiki' prior to phpwiki-1.2.2) 
      $mysql_db = 'phpwiki_testdatenbank';

und die Datenbank mit create database phpwiki_testdatenbank; angelegt.


Wenn ich jetzt auf "http://localhost/phpwiki-1.2.7/" gehe erhalte ich diese Meldung:

Inserting page AddingPages, version 1 from text file
--------------------------------------------------------------------------------

WikiFatalError
Error writing page 'AddingPages'
MySQL error: Table 'phpwiki_testdatenbank.wiki' doesn't exist

Wie kommt er auf dieses '.wiki' ?
soll ich die SQL-DB so nennen ? odder darf ich die garnicht von Hand anlegen?
 
Zuletzt bearbeitet:

Hepatitis

Cadet 3rd Year
Ersteller dieses Themas
Dabei seit
Feb. 2005
Beiträge
45
Ich habe aus einer Datei Namens "/INSTALL.mysql" herausgelesen dass es ein MYSQL Schemaibt mit dem die Tabellen angelegt werden können.

Ich habe jetzt die Wiki Startseite und gehe als nächstes an die Configuration.

*freu*
 
Top