Package: phpwiki Severity: wishlist [So there's a record in the BTS for this]
----- Forwarded message from Matthew Davidson ----- Date: Thu, 05 Aug 2004 15:04:05 +1000 Subject: PhpWikiFarm with a MySQL Back-End Hi Matt, I've just finished tearing my hair out trying to make a PhpWikiFarm with a MySQL Back-End. I'm not usually a documenting kind of guy, but I enclose the below text in case you can use any of it in the Debian package docs in future. Matthew. -- How to make a PhpWikiFarm with a MySQL Back-End Step 1 Copy index.php to the place where you want it to live. Step 2 Edit the include path in section zero of index.php to point to the rest of the PhpWiki install, eg.: ini_set('include_path', '.:/usr/share/phpwiki:/usr/share/php'); Step 3 Edit Part Two: the Database Section of index.php as follows: $DBParams = array( 'dbtype' => 'SQL', 'dsn' => 'mysql://db_username:[EMAIL PROTECTED]/db_name', 'timeout' => 10, 'db_session_table' => 'phpwiki_session', 'prefix' => 'phpwiki_' ); define('USE_DB_SESSION',true); The 'phpwiki_' prefix is so we can keep a single MySQL database for each user for a number of applications (PhpWiki, WordPress, etc.) without getting a namespace clash. Step 4 Edit Part Six: URL options. SERVER_NAME, SCRIPT_NAME, and PHPWIKI_DIR are essential. The whole thing will choke (unable to find templates) if you don't explicity specify PHPWIKI_DIR, and all links will point back to the system-wide wiki if you don't set SERVER_NAME (in the case of an Apache virtual hosts setup) or SCRIPT_NAME properly. I don't know if DATA_PATH is used if you're using a MySQL backend; it doesn't appear to be, so I left it alone. Step 5 Edit the included mysql.sql schema file so that the table names all have the 'phpwiki_' prefix. i.e.: drop table if exists page; CREATE TABLE page ( becomes: drop table if exists phpwiki_page; CREATE TABLE phpwiki_page ( Be careful to only change the table names, not the index names. Step 6 Assuming you already have a database created, slurp in the schema thus: # mysql -uuser -ppassword phpwiki <schemas/mysql.sql You should now be ready to rock. ----- End forwarded message -----
signature.asc
Description: Digital signature