Menu

#68 Installer (Alpha)

1.3.x
closed
None
4
2012-10-11
2004-02-19
No

Installed borrowed from Postnuke.

Installer that generates on the fly SQL and creates db.
Currenty for ADODB and MYSQL only, but does work to
add db connections.

Rips out a lot of stuff in index.php, etc.

Also a minor fix or two:

Patch against Current CVS (additional files below):
? config-old.php
? config.php
? index-old.php
? inst
? install.php
? language
? doc/LICENSE.txt
? doc/docs
Index: index.php
===================================
================================
RCS file: /cvsroot/phpwiki/phpwiki/index.php,v
retrieving revision 1.124
diff -u -r1.124 index.php
--- index.php 16 Feb 2004 00:20:30 -0000
1.124
+++ index.php 19 Feb 2004 05:38:51 -0000
@@ -10,13 +10,13 @@

/*
Copyright 1999, 2000, 2001, 2002
$ThePhpWikiProgrammingTeam = array(
-"Steve Wainstead", "Clifford A. Adams", "Lawrence
Akka",
+"Steve Wainstead", "Clifford A. Adams", "Lawrence
Akka",
"Scott R. Anderson", "Jon Ĺslund", "Neil Brown", "Jeff
Dairiki",
"Stéphane Gourichon", "Jan Hidders", "Arno
Hollosi", "John Jorgensen",
"Antti Kaihola", "Jeremie Kass", "Carsten
Klapp", "Marco Milanesi",
-"Grant Morgan", "Jan Nieuwenhuizen", "Aredridel
Niothke",
-"Pablo Roca Rozas", "Sandino Araico Sánchez", "Joel
Uckelman",
-"Reini Urban", "Tim Voght", "Jochen Kalmbach");
+"Grant Morgan", "Jan Nieuwenhuizen", "Aredridel
Niothke",
+"Pablo Roca Rozas", "Sandino Araico Sánchez", "Joel
Uckelman",
+"Reini Urban", "Tim Voght", "Jochen
Kalmbach", "Jason Potkanski:Electrawn");

This file is part of PhpWiki.

@@ -35,7 +35,6 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston,
MA 02111-1307 USA
*/

-
////////////////////////////////////////////////////////////
/////////
/*
This is the starting file for PhpWiki. All this file does is
set
@@ -54,7 +53,7 @@

// Define PHP's include path so that it can find the PHP
source code
// for this PhpWiki.
-//
+//
// You shouldn't need to do this unless you've moved
index.php out
// of the PhpWiki install directory.
//
@@ -74,176 +73,20 @@
define ('PHPWIKI_VERSION', '1.3.8pre');
require "lib/prepend.php";
rcs_id('$Id: index.php,v 1.124 2004/02/16 00:20:30
rurban Exp $');
-
-
/////////////////////////////////////////////////////////////
////////
-//
-// Part One:
-// Authentication and security settings. See Part Three
for more.
-//
-
/////////////////////////////////////////////////////////////
////////
-
-// The name of your wiki.
-//
-// This is used to generate a keywords meta tag in the
HTML templates,
-// in bookmark titles for any bookmarks made to pages
in your wiki,
-// and during RSS generation for the <title> of the <br> RSS channel.<br> -//<br> -// To use your own logo and signature files, name <br> them PhpWikiLogo.png<br> -// and PhpWikiSignature.png and put them into <br> themes/default/images<br> -// (substituting "PhpWiki" in the filename with the <br> name you define<br> -// here).<br> -//<br> -// It is recommended this be a relatively short <br> WikiWord like the<br> -// InterWiki monikers found in the InterWikiMap. (For <br> examples, see<br> -// lib/interwiki.map).<br> -if (!defined('WIKI_NAME')) define<br> ('WIKI_NAME', 'PhpWiki');<br> -<br> -// Visitor Hostname Lookup<br> -//<br> -// If set, reverse dns lookups will be performed to <br> attempt to convert<br> -// the user's IP number into a host name, in the case <br> where the http<br> -// server does not do this.<br> -if (!defined('ENABLE_REVERSE_DNS')) define<br> ('ENABLE_REVERSE_DNS', true);<br> -<br> -// Username and password of administrator.<br> -//<br> -// Set these to your preferences. For heaven's sake <br> pick a good<br> -// password and use the passencrypt.php tool. See:<br> -// <a href="http://wolfram.org/writing/howto/password.html">http://wolfram.org/writing/howto/password.html</a><br> -// <br> -// Log into the wiki with the admin user and password <br> to lock, unlock,<br> -// or remove pages and to perform other <br> PhpWikiAdministration<br> -// functions. On all other occasions you should simply <br> log in with<br> -// your regular WikiName.<br> -if (!defined('ADMIN_USER')) define<br> ('ADMIN_USER', "");<br> -if (!defined('ADMIN_PASSWD')) define<br> ('ADMIN_PASSWD', "");<br> -// It is recommended to use the passencrypt.php <br> utility to encode the<br> -// admin password, in the unlikely event someone <br> gains ftp or ssh<br> -// access to the server and directory containing <br> phpwiki. Once you<br> -// have pasted the encrypted password into <br> ADMIN_PASSWD, uncomment<br> -// this next line.<br> -//if (!defined('ENCRYPTED_PASSWD')) define<br> ('ENCRYPTED_PASSWD', true);<br> -<br> -// Private ZIP Dumps of All Wiki Pages<br> -//<br> -// If true, only the admin user can make zip dumps. <br> Otherwise anyone<br> -// may download all wiki pages as a single zip archive.<br> -if (!defined('ZIPDUMP_AUTH')) define<br> ('ZIPDUMP_AUTH', false);<br> -<br> -// Define to false to disable the RawHtml plugin.<br> -//if (!defined('ENABLE_RAW_HTML')) define<br> ('ENABLE_RAW_HTML', false);<br> -<br> -// If you define this to true, (MIME-type) page-dumps <br> (either zip dumps,<br> -// or "dumps to directory" will be encoded using the <br> quoted-printable<br> -// encoding. If you're actually thinking of mailing the <br> raw page dumps,<br> -// then this might be useful, since (among other <br> things,) it ensures<br> -// that all lines in the message body are under 80 <br> characters in length.<br> -//<br> -// Also, setting this will cause a few additional mail <br> headers<br> -// to be generated, so that the resulting dumps are <br> valid<br> -// RFC 2822 e-mail messages.<br> -//<br> -// Probably you can just leave this set to false, in <br> which case you get<br> -// raw ('binary' content-encoding) page dumps.<br> -if (!defined('STRICT_MAILABLE_PAGEDUMPS')) define<br> ('STRICT_MAILABLE_PAGEDUMPS', false);<br> -<br> -// Here you can change the filename suffix used for <br> XHTML page dumps.<br> -// If you don't want any suffix just comment this out.<br> -$HTML_DUMP_SUFFIX = '.html';<br> -<br> -// The maximum file upload size.<br> -if (!defined('MAX_UPLOAD_SIZE')) define<br> ('MAX_UPLOAD_SIZE', 16 * 1024 * 1024);<br> -<br> -// If the last edit is older than MINOR_EDIT_TIMEOUT <br> seconds, the<br> -// default state for the "minor edit" checkbox on the <br> edit page form<br> -// will be off.<br> -if (!defined('MINOR_EDIT_TIMEOUT')) define<br> ("MINOR_EDIT_TIMEOUT", 7 * 24 * 3600);<br> -<br> -// Actions listed in this array will not be allowed. The <br> complete list<br> -// of actions can be found in lib/main.php within the <br> function<br> -// getActionDescription.<br> -//$DisabledActions = array('dumpserial', 'loadfile');<br> -<br> -// PhpWiki can generate an access_log (in "NCSA <br> combined log" format)<br> -// for you. If you want one, define this to the name of <br> the log<br> -// file. The server must have write access to the <br> directory specified.<br> -//define('ACCESS_LOG', '/var/tmp/wiki_access_log');<br> -<br> -<br> -// By default PhpWiki will try to have PHP compress its <br> output<br> -// before sending it to the browser (if you have a <br> recent enough<br> -// version of PHP and the browser supports it.)<br> -// Define COMPRESS_OUTPUT to false to prevent <br> output compression.<br> -// Define COMPRESS_OUTPUT to true to force output <br> compression,<br> -// even if we think your version of PHP does this in a <br> buggy<br> -// fashion.<br> -// Leave it undefined to leave the choice up to PhpWiki.<br> -//define('COMPRESS_OUTPUT', false);<br> -<br> -<br> -// HTTP CACHE_CONTROL<br> -//<br> -// This controls how PhpWiki sets the HTTP cache <br> control<br> -// headers (Expires: and Cache-Control:) <br> -//<br> -// Choose one of:<br> -//<br> -// NONE: This is roughly the old (pre 1.3.4) behavior.<br> PhpWiki will<br> -// instruct proxies and browsers never to cache <br> PhpWiki output.<br> -//<br> -// STRICT: Cached pages will be invalidated whenever <br> the database global<br> -// timestamp changes. This should behave just <br> like NONE (modulo<br> -// bugs in PhpWiki and your proxies and <br> browsers), except that<br> -// things will be slightly more efficient.<br> -//<br> -// LOOSE: Cached pages will be invalidated whenever <br> they are edited,<br> -// or, if the pages include plugins, when the plugin <br> output could<br> -// concievably have changed.<br> -//<br> -// Behavior should be much like STRICT, except <br> that sometimes<br> -// wikilinks will show up as undefined (with the <br> question mark)<br> -// when in fact they refer to (recently) created <br> pages.<br> -// (Hitting your browsers reload or perhaps shift-<br> reload button<br> -// should fix the problem.)<br> -//<br> -// ALLOW_STALE: Proxies and browsers will be allowed <br> to used stale pages.<br> -// (The timeout for stale pages is controlled by <br> CACHE_CONTROL_MAX_AGE.)<br> -//<br> -// This setting will result in quirky behavior. When <br> you edit a<br> -// page your changes may not show up until you <br> shift-reload the<br> -// page, etc...<br> -//<br> -// This setting is generally not advisable, however <br> it may be useful<br> -// in certain cases (e.g. if your wiki gets lots of <br> page views,<br> -// and few edits by knowledgable people who <br> won't freak over the quirks.)<br> -//<br> -// The default is currently LOOSE.<br> -//<br> -if (!defined('CACHE_CONTROL')) define<br> ('CACHE_CONTROL', 'LOOSE');<br> -<br> -// Maximum page staleness, in seconds.<br> +// If your php was compiled with --enable-trans-sid it <br> tries to<br> +// add a PHPSESSID query argument to all URL <br> strings when cookie<br> +// support isn't detected in the client browser. For <br> reasons<br> +// which aren't entirely clear (PHP bug) this screws up <br> the URLs<br> +// generated by PhpWiki. Therefore, transparent <br> session ids<br> +// should be disabled. This next line does that.<br> //<br> -// This only has effect if CACHE_CONTROL is set to <br> ALLOW_STALE.<br> -if (!defined('CACHE_CONTROL_MAX_AGE')) define<br> ('CACHE_CONTROL_MAX_AGE', 600);<br> +// (At the present time, you will not be able to log-in <br> to PhpWiki,<br> +// unless your browser supports cookies.)<br> +//@ini_set('session.use_trans_sid', 0);</p> <p>-// MARKUP CACHING<br> -//<br> -// PhpWiki normally caches a preparsed version (i.e. <br> mostly<br> -// converted to HTML) of the most recent version of <br> each page.<br> -// (Parsing the wiki-markup takes a fair amount of <br> CPU.)<br> -//<br> -// Define WIKIDB_NOCACHE_MARKUP to true to <br> disable the<br> -// caching of marked-up page content.<br> -//<br> -// Note that you can also disable markup caching on a <br> per-page<br> -// temporary basis by addinging a query arg of '?<br> nocache=1'<br> -// to the URL to the page. (Use '?nocache=purge' to <br> completely<br> -// discard the cached version of the page.)<br> -//<br> -// You can also purge the cached markup globally by <br> using the<br> -// "Purge Markup Cache" button on the <br> PhpWikiAdministration page.<br> -//if (!defined('WIKIDB_NOCACHE_MARKUP')) define <br> ('WIKIDB_NOCACHE_MARKUP', true);<br> +if (!defined('ADMIN_USER')) define<br> ('ADMIN_USER', "Admin");<br> +if (!defined('ADMIN_PASSWD')) define<br> ('ADMIN_PASSWD', "Password");</p> <p>////////////////////////////////////////////////////////////<br> /////////<br> //<br> @@ -257,20 +100,21 @@<br> //<br> // Not all of these parameters are used by any <br> particular DB backend.<br> //<br> -$DBParams = array(<br> +$DBParams = array();<br> +<br> // Select the database type:<br> //<br> // Choose ADODB or SQL to use an SQL database <br> with ADODB or PEAR<br> // respectively (both ADODB and PEAR libraries are <br> already included<br> // with PhpWiki).<br> // Choose dba to use one of the standard UNIX dbm <br> libraries.<br> - // Choose file to use a flat file database.<br> - //'dbtype' => 'ADODB',<br> - //'dbtype' => 'SQL',<br> - 'dbtype' => 'dba',<br> - //'dbtype' => 'file',<br> - <br> - // For SQL based backends, specify the database as <br> a DSN<br> + // Choose file to use a flat file database. SQL uses <br> PEAR.<br> + // Valid choices: 'ADODB', 'SQL','dba', 'file'<br> +$DBParams<span>['dbtype']</span> = 'ADODB';<br> +<br> +<br> + // Used by: 'ADODB', 'SQL'<br> + // Specify the database as a DSN<br> // The most general form of a DSN looks like:<br> //<br> // phptype<br> (dbsyntax)://username:password@protocol+hostspec/d<br> atabase<br> @@ -286,59 +130,43 @@<br> //'dsn' => 'mysql://guest@unix<br> (/var/lib/mysql/mysql.sock)/test',<br> //'dsn' => 'mysql://guest@localhost/test',<br> //'dsn' => 'pgsql://localhost/test',<br> +$DBParams<span>['dsn']</span> <br> = 'mysql://electrawn:h4rm0nic@192.168.1.102/test1m<br> oretime';</p> <ul> <li>// The common table prefix (see below) is added if <br> defined</li> <li>'db_session_table' => 'session',</li> <li></li> <li> <h2 id="used-by-all-db-types">// Used by all DB types:</h2> </li> <li>// Used by: 'dba', 'SQL', 'ADODB'<br> // prefix for filenames or table names</li> <li>/* </li> <li> <ul> <li>currently you MUST EDIT THE SQL file too (in the <br> schemas/</li> </ul> </li> <li> <ul> <li>directory because we aren't doing on the fly sql <br> generation</li> </ul> </li> <li> <ul> <li>during the installation.</li> </ul> </li> <li>*/</li> <li>//'prefix' => 'phpwiki_',</li> <li></li> <li>// Used by either 'dba' or 'file' and must be writable <br> by the web</li> <li>// server If you leave this as '/tmp' you will probably <br> lose all</li> <li>// your files eventually</li> <li>'directory' => "/tmp",</li> <li>// Example: 'phpwiki_'<br> +$DBParams<span>['prefix']</span> = 'argh';<br> +</li> <li>// Used by: 'dba' and 'file'</li> <li>// Directory must be writable by the web server <br> (chmod 666)</li> <li>// WARNING: If you leave this as '/tmp' you may <br> lose all</li> <li> <p>// your files!<br> +$DBParams<span>['directory']</span> = "/tmp";<br> +</p> </li> <li> <p>// Used by: 'dba'<br> // choose the type of DB database file to use; most <br> GNU systems have gdbm</p> </li> <li>'dba_handler' => 'gdbm', // Either of 'gdbm' <br> or 'db2' work great for me.</li> <li>//'dba_handler' => 'db2',</li> <li>//'dba_handler' => 'db3', // Works fine on <br> Windows, but not on every linux.</li> <li>//'dba_handler' => 'dbm', // On sf.net redhat <br> there's dbm and gdbm.</li> <li>// dbm suffers from limits on <br> size of data items?</li> <li>// Either of 'gdbm' or 'db2' work great for me.</li> <li>// Choices:</li> <li>// 'gdbm' Full featured and on most GNU systems</li> <li>// 'db2',</li> <li>// 'db3', // Works fine on Windows, but not on <br> every linux.</li> <li>// 'dbm', // On sf.net redhat there's dbm and <br> gdbm.</li> <li> <p>// dbm suffers from limits on size of data <br> items?<br> +$DBParams<span>['dba_handler']</span> = 'gdbm';</p> </li> <li> <p>'timeout' => 20,<br> +$DBParams<span>['timeout']</span> = 20;<br> //'timeout' => 5<br> -);<br> +</p> </li> </ul> <p>////////////////////////////////////////////////////////////<br> /////////<br> // PHP Session settings:<br> //</p> <p>-// USE_DB_SESSION fails with the current CVS code.<br> -//define('USE_DB_SESSION',false);<br> -// Only for $DBParams<span>['dbtype']</span> => 'SQL'. See <br> schemas/mysql.sql or <br> -// schemas/psql.sql. $DBParams<span>['db_session_table']</span> <br> must be defined.<br> -if (!defined('USE_DB_SESSION') and <br> - $DBParams<span>['dbtype']</span> == 'SQL' and <br> - $DBParams<span>['db_session_table']</span>)<br> - define('USE_DB_SESSION',true);<br> -<br> -// If your php was compiled with --enable-trans-sid it <br> tries to<br> -// add a PHPSESSID query argument to all URL strings <br> when cookie<br> -// support isn't detected in the client browser. For <br> reasons<br> -// which aren't entirely clear (PHP bug) this screws up <br> the URLs<br> -// generated by PhpWiki. Therefore, transparent <br> session ids<br> -// should be disabled. This next line does that.<br> -//<br> -// (At the present time, you will not be able to log-in <br> to PhpWiki,<br> -// unless your browser supports cookies.)<br> -@ini_set('session.use_trans_sid', 0);<br> +// Only for $DBParams<span>['dbtype']</span> = 'SQL'. See <br> schemas/mysql.sql or<br> +// schemas/psql.sql.<br> +if (!defined('USE_DB_SESSION')) define<br> ('USE_DB_SESSION',false);<br> +if (!defined('USE_DB_SESSION') and $DBParams<br> <span>['dbtype']</span> == 'SQL') define('USE_DB_SESSION',true);</p> <p>// The login code now uses PHP's session support. <br> Usually, the default<br> // configuration of PHP is to store the session state <br> information in<br> @@ -351,405 +179,6 @@</p> <p>//ini_set('session.save_path', 'some_other_directory');</p> <p>-<br> /////////////////////////////////////////////////////////////<br> ////////<br> -//<br> -// The next section controls how many old revisions of <br> each page are<br> -// kept in the database.<br> -//<br> -// There are two basic classes of revisions: major and <br> minor. Which<br> -// class a revision belongs in is determined by whether <br> the author<br> -// checked the "this is a minor revision" checkbox <br> when they saved the<br> -// page.<br> -// <br> -// There is, additionally, a third class of revisions: <br> author<br> -// revisions. The most recent non-mergable revision <br> from each distinct<br> -// author is and author revision.<br> -//<br> -// The expiry parameters for each of those three <br> classes of revisions<br> -// can be adjusted seperately. For each class there are <br> five<br> -// parameters (usually, only two or three of the five <br> are actually<br> -// set) which control how long those revisions are kept <br> in the<br> -// database.<br> -//<br> -// max_keep: If set, this specifies an absolute <br> maximum for the<br> -// number of archived revisions of that class. <br> This is<br> -// meant to be used as a safety cap when a <br> non-zero<br> -// min_age is specified. It should be set <br> relatively high,<br> -// and it's purpose is to prevent malicious or <br> accidental<br> -// database overflow due to someone causing <br> an<br> -// unreasonable number of edits in a short <br> period of time.<br> -//<br> -// min_age: Revisions younger than this (based <br> upon the supplanted<br> -// date) will be kept unless max_keep is <br> exceeded. The age<br> -// should be specified in days. It should be a<br> -// non-negative, real number,<br> -//<br> -// min_keep: At least this many revisions will be kept.<br> -//<br> -// keep: No more than this many revisions will be <br> kept.<br> -//<br> -// max_age: No revision older than this age will be <br> kept.<br> -//<br> -// Supplanted date: Revisions are timestamped at the <br> instant that they<br> -// cease being the current revision. Revision age is <br> computed using<br> -// this timestamp, not the edit time of the page.<br> -//<br> -// Merging: When a minor revision is deleted, if the <br> preceding<br> -// revision is by the same author, the minor revision is <br> merged with<br> -// the preceding revision before it is deleted. <br> Essentially: this<br> -// replaces the content (and supplanted timestamp) of <br> the previous<br> -// revision with the content after the merged minor <br> edit, the rest of<br> -// the page metadata for the preceding version <br> (summary, mtime, ...)<br> -// is not changed.<br> -//<br> -// Keep up to 8 major edits, but keep them no longer <br> than a month.<br> -$ExpireParams<span>['major']</span> = array('max_age' => 32,<br> - 'keep' => 8);<br> -// Keep up to 4 minor edits, but keep them no longer <br> than a week.<br> -$ExpireParams<span>['minor']</span> = array('max_age' => 7,<br> - 'keep' => 4);<br> -// Keep the latest contributions of the last 8 authors <br> up to a year.<br> -// Additionally, (in the case of a particularly active <br> page) try to<br> -// keep the latest contributions of all authors in the <br> last week (even<br> -// if there are more than eight of them,) but in no case <br> keep more<br> -// than twenty unique author revisions.<br> -$ExpireParams<span>['author']</span> = array('max_age' => 365,<br> - 'keep' => 8,<br> - 'min_age' => 7,<br> - 'max_keep' => 20);<br> -<br> -<br> /////////////////////////////////////////////////////////////<br> ////////<br> -//<br> -// Part Three: (optional)<br> -// User Authentication<br> -//<br> -<br> /////////////////////////////////////////////////////////////<br> ////////<br> -// <br> -// New user authentification configuration:<br> -// We support three basic authentification methods <br> and a stacked array <br> -// of advanced auth methods to get and check the <br> passwords:<br> -//<br> -// ALLOW_ANON_USER default true<br> -// ALLOW_ANON_EDIT default true<br> -// ALLOW_BOGO_LOGIN default true<br> -// ALLOW_USER_PASSWORDS default true<br> -<br> -// allow anon users to view pages! (not edit)<br> -if (!defined('ALLOW_ANON_USER')) define<br> ('ALLOW_ANON_USER', true); <br> -// allow anon users to edit pages<br> -if (!defined('ALLOW_ANON_EDIT')) define<br> ('ALLOW_ANON_EDIT', true); <br> -<br> -// This was replaced by ALLOW_ANON_EDIT<br> -if (!defined('REQUIRE_SIGNIN_BEFORE_EDIT')) define<br> ('REQUIRE_SIGNIN_BEFORE_EDIT', ! <br> ALLOW_ANON_EDIT);<br> -<br> -// If ALLOW_BOGO_LOGIN is true, users are allowed to <br> login (with<br> -// any/no password) using any userid which: <br> -// 1) is not the ADMIN_USER, and<br> -// 2) is a valid WikiWord (matches <br> $WikiNameRegexp.)<br> -// If true, users may be created by themselves. <br> Otherwise we need seperate auth. <br> -// If such a user will create a so called HomePage with <br> his userid, he will <br> -// be able to store his preferences and password there.<br> -if (!defined('ALLOW_BOGO_LOGIN')) define<br> ('ALLOW_BOGO_LOGIN', true);<br> -<br> -// True User Authentification:<br> -// To require user passwords:<br> -// ALLOW_ANON_USER = false<br> -// ALLOW_ANON_EDIT = false<br> -// ALLOW_BOGO_LOGIN = false,<br> -// ALLOW_USER_PASSWORDS = true.<br> -// Otherwise any anon or bogo user might login <br> without any or a wrong password.<br> -if (!defined('ALLOW_USER_PASSWORDS')) define<br> ('ALLOW_USER_PASSWORDS', true);<br> -<br> -// Below we define which methods exists and in which <br> order <br> -// they are used:<br> -// BogoLogin: WikiWord enough, but with <br> PASSWORD_LENGTH_MINIMUM<br> -// PersonalPage: Store passwords in the users <br> homepage metadata (simple)<br> -// HttpAuth: Use the protection by the webserver <br> (.htaccess)<br> -// Db: Use $DBAuthParams[] (see below) <br> with the PearDB or <br> -// ADODB only.<br> -// LDAP: Authenticate against <br> LDAP_AUTH_HOST with LDAP_BASE_DN<br> -// IMAP: Authenticate against <br> IMAP_AUTH_HOST (email account)<br> -// File: Store username:crypted-passwords <br> in .htaccess like files. <br> -// Use Apache's htpasswd to manage this <br> file.<br> -<br> -if (defined('ALLOW_USER_PASSWORDS')) {<br> -<br> - // use the following order of authentification <br> methods:<br> - if (!isset($USER_AUTH_ORDER))<br> - $USER_AUTH_ORDER = <br> - array(<br> -// "BogoLogin",<br> - "PersonalPage",<br> -// "HttpAuth",<br> - "Db",<br> -// "LDAP", // define <br> LDAP_AUTH_HOST and LDAP_BASE_DN<br> -// "IMAP", // define IMAP_AUTH_HOST<br> -// "File" // define AUTH_USER_FILE and <br> opt. AUTH_USER_FILE_STORABLE<br> - ) ;<br> -<br> - if (!defined('PASSWORD_LENGTH_MINIMUM')) <br> define('PASSWORD_LENGTH_MINIMUM', 2);<br> - <br> - if (!defined('USER_AUTH_POLICY'))<br> - //We support the following auth policies:<br> - // first-only: use only the first method in <br> USER_AUTH_ORDER<br> - // old: ignore USER_AUTH_ORDER and try <br> to use all available <br> - // methods as in the previous PhpWiki <br> releases (slow)<br> - // strict: check if the user exists for all <br> methods: <br> - // on the first existing user, try the <br> password. <br> - // dont try the other methods on failure <br> then<br> - // stacked: check the given user - password <br> combination for all methods <br> - // and return true on the first success.<br> -<br> - //define('USER_AUTH_POLICY','first-only');<br> - define('USER_AUTH_POLICY','old');<br> - //define('USER_AUTH_POLICY','strict');<br> - //define('USER_AUTH_POLICY','stacked');<br> -}<br> -<br> -// LDAP auth:<br> -if (!defined('LDAP_AUTH_HOST')) define<br> ('LDAP_AUTH_HOST', 'localhost');<br> -// The organizational or domain BASE DN: <br> e.g. "dc=mydomain,dc=com" to restrict the search<br> -// Note: ou=Users and ou=Groups are used for <br> GroupLdap Membership<br> -if (!defined('LDAP_BASE_DN')) define<br> ('LDAP_BASE_DN', "ou=Users,o=Development,dc=myco<br> mpany.com");<br> -<br> -// IMAP auth: <br> -// check userid/passwords from a imap server, <br> defaults to localhost<br> -if (!defined('IMAP_AUTH_HOST')) define<br> ('IMAP_AUTH_HOST', 'localhost:143/imap/notls');<br> -// Some IMAP_AUTH_HOST samples:<br> -// "localhost", "localhost:143/imap/notls", <br> -// "localhost:993/imap/ssl/novalidate-cert" (SuSE <br> refuses non-SSL conections)<br> -<br> -// File auth:<br> -//if (!defined('AUTH_USER_FILE')) define<br> ('AUTH_USER_FILE', '/etc/shadow'); // <br> or '/etc/httpd/.htpasswd'<br> -// set this to true if the user may change his password <br> into this file.<br> -//if (!defined('AUTH_USER_FILE_STORABLE')) define<br> ('AUTH_USER_FILE_STORABLE',false);<br> -<br> -// Group membership:<br> -//if (!defined('GROUP_METHOD')) define<br> ('GROUP_METHOD', "NONE");<br> -if (!defined('GROUP_METHOD')) define<br> ('GROUP_METHOD', "WIKIPAGE");<br> -//if (!defined('GROUP_METHOD')) define<br> ('GROUP_METHOD', "DB");<br> -//if (!defined('GROUP_METHOD')) define<br> ('GROUP_METHOD', "FILE");<br> -//if (!defined('GROUP_METHOD')) define<br> ('GROUP_METHOD', "LDAP");<br> -//if (!defined('AUTH_GROUP_FILE')) define<br> ('AUTH_GROUP_FILE', '/etc/groups'); // <br> or '/etc/httpd/.htgroup'<br> -<br> -// Seperate DB User Authentication.<br> -// Can be external, like radius, phpnuke, courier <br> authmysql,<br> -// apache auth_mysql or something else.<br> -// The default is to store the data as metadata in the <br> users PersonalPage.<br> -// The most likely dsn option is the same dsn as the <br> wikipages.<br> -$DBAuthParams = array (<br> - // if not defined use $DBParams<span>['dsn']</span> i.e. the <br> phpwiki database<br> - //'auth_dsn' => 'mysql://localhost/phpwiki',<br> -<br> - // USER => PASSWORD<br> - // plaintext passwords:<br> - // 'auth_check' => 'SELECT IF<br> (passwd="$password",1,0) as ok FROM user WHERE <br> userid="$userid"',<br> - // database (md5) passwords (more secure):<br> - 'auth_check' => 'SELECT IF(passwd=PASSWORD<br> ("$password"),1,0) as ok FROM user WHERE <br> userid="$userid"',<br> - // crypt passwords:<br> - //'auth_check' => 'SELECT password as password <br> FROM user WHERE userid="$userid"',<br> - // this is only needed with auth_crypt_method plain:<br> - 'auth_user_exists' => 'SELECT userid FROM user <br> WHERE userid="$userid"',<br> -<br> - //'auth_crypt_method' => 'crypt', // 'crypt' <br> (unix)<br> - 'auth_crypt_method' => 'plain', // plain or <br> secure mysql PASSWORD()<br> -<br> - // If 'auth_update' is not defined but 'auth_check' is <br> defined, the user cannot <br> - // change his password.<br> - //don't create new users:<br> - // $password is processed by <br> the 'auth_crypt_method', don't create.<br> - //'auth_update' => 'UPDATE user SET <br> passwd="$password" WHERE userid="$userid"',<br> - // for mysql md5 use 'auth_crypt_method'<br> => 'plain'<br> - //'auth_update' => 'UPDATE user SET <br> passwd=PASSWORD("$password") WHERE <br> userid="$userid"',<br> - //or create new users automatically, with <br> auth_crypt_method = plain<br> - 'auth_update' => 'REPLACE INTO user SET <br> userid="$userid", passwd=PASSWORD("$password")',<br> -<br> - // USER => PREFERENCES<br> - // This can be optionally defined in the phpwiki db.<br> - // The default is to store it the users homepage.<br> - 'pref_select' => 'SELECT prefs FROM user WHERE <br> userid="$userid"',<br> - //users must be predefined:<br> - //'pref_update' => 'UPDATE user SET <br> prefs="$pref_blob" WHERE userid="$userid"',<br> - //or users can create themselves:<br> - 'pref_update' => 'REPLACE INTO user SET <br> prefs="$pref_blob", userid="$userid"',<br> -<br> - // USERS <=> GROUPS<br> - // DB methods for lib/WikiGroup.php, see also <br> AUTH_GROUP_FILE above.<br> - // You can define 1:n or n:m user<=>group <br> relations, as you wish.<br> - // Sample configurations<br> - // only one group per user (1:n):<br> - //'is_member' => 'SELECT user FROM user WHERE <br> user="$userid" AND group="$groupname"',<br> - //'group_members' => 'SELECT user FROM user <br> WHERE group="$groupname"',<br> - //'user_groups' => 'SELECT group FROM user <br> WHERE user="$userid"',<br> - // or multiple groups per user (n:m):<br> - 'is_member' => 'SELECT userid FROM member <br> WHERE userid="$userid" AND <br> groupname="$groupname"',<br> - 'group_members' => 'SELECT DISTINCT userid <br> FROM member WHERE groupname="$groupname"',<br> - 'user_groups' => 'SELECT groupname FROM <br> member WHERE userid="$userid"',<br> -<br> - 'dummy' => false,<br> -);<br> -<br> -// Old settings, only needed for ENABLE_USER_NEW = <br> false<br> -//<br> -// The wiki can be protected by HTTP Auth. Use the <br> username and password <br> -// from there, but this is not sufficient. Try the other <br> methods also.<br> -if (!defined('ALLOW_HTTP_AUTH_LOGIN')) define<br> ('ALLOW_HTTP_AUTH_LOGIN', false);<br> -// If ALLOW_USER_LOGIN is true, any defined internal <br> and external<br> -// authentication method is tried. If not, we don't care <br> about<br> -// passwords, but listen to the next two constants. <br> Note that external<br> -// authentication is not supported at this time, you will <br> likely have<br> -// to patch code yourself to get PhpWiki to recognise <br> userids and<br> -// passwords from an external source.<br> -if (!defined('ALLOW_USER_LOGIN')) define<br> ('ALLOW_USER_LOGIN', false);<br> -// also only if ENABLE_USER_NEW = false:<br> -//if (!defined('ALLOW_LDAP_LOGIN')) define<br> ('ALLOW_LDAP_LOGIN', true and function_exists<br> ('ldap_connect'));<br> -//if (!defined('ALLOW_IMAP_LOGIN')) define<br> ('ALLOW_IMAP_LOGIN', true and function_exists<br> ('imap_open'));<br> -<br> -<br> /////////////////////////////////////////////////////////////<br> ////////<br> -//<br> -// Part Four:<br> -// Page appearance and layout<br> -//<br> -<br> /////////////////////////////////////////////////////////////<br> ////////<br> -<br> -/<em> THEME<br> - * - * Most of the page appearance is controlled by files in <br> the theme<br> - * subdirectory.<br> - * - * There are a number of pre-defined themes shipped <br> with PhpWiki.<br> - * Or you may create your own (e.g. by copying and <br> then modifying one of<br> - * stock themes.)<br> - * - * Pick one.<br> - </em>/<br> -if (!defined('THEME')) {<br> -define('THEME', 'default');<br> -//define('THEME', 'Hawaiian');<br> -//define('THEME', 'MacOSX');<br> -//define('THEME', 'Portland');<br> -//define('THEME', 'Sidebar');<br> -//define('THEME', 'SpaceWiki');<br> -}<br> -<br> -// Select a valid charset name to be inserted into the <br> xml/html pages,<br> -// and to reference links to the stylesheets (css). For <br> more info see:<br> -// <a href="http://www.iana.org/assignments/character- sets">http://www.iana.org/assignments/character- sets</a>. Note that PhpWiki<br> -// has been extensively tested only with the latin1 (iso-<br> 8859-1)<br> -// character set.<br> -//<br> -// If you change the default from iso-8859-1 PhpWiki <br> may not work<br> -// properly and will require code modifications, at the <br> very least you<br> -// will have to convert the files in pgsrc or <br> locale/xx/pgsrc to<br> -// match!<br> -//<br> -// Character sets similar to iso-8859-1 may work with <br> little or no<br> -// modification depending on your setup. The database <br> must also<br> -// support the same charset, and of course the same is <br> true for the<br> -// web browser. (Some work is in progress hopefully to <br> allow more<br> -// flexibility in this area in the future).<br> -if (!defined('CHARSET')) define("CHARSET", "iso-8859-<br> 1");<br> -<br> -// Select your language/locale - default language <br> is "en" for English.<br> -// Other languages available:<br> -// English "en" (English - HomePage)<br> -// Dutch "nl" (Nederlands - ThuisPagina)<br> -// Spanish "es" (Espańol - PáginaPrincipal)<br> -// French "fr" (Français - Accueil)<br> -// German "de" (Deutsch - StartSeite)<br> -// Swedish "sv" (Svenska - Framsida)<br> -// Italian "it" (Italiano - PaginaPrincipale)<br> -// Japanese "ja" (Japanese - ĽŰĄźĽŕĽÚĄźĽ¸)<br> -//<br> -// If you set DEFAULT_LANGUAGE to the empty string, <br> your system's<br> -// default language (as determined by the applicable <br> environment<br> -// variables) will be used.<br> -//<br> -if (!defined('DEFAULT_LANGUAGE')) define<br> ('DEFAULT_LANGUAGE', 'en');<br> -<br> -/<em> WIKI_PGSRC -- specifies the source for the initial <br> page contents of<br> - * the Wiki. The setting of WIKI_PGSRC only has effect <br> when the wiki is<br> - * accessed for the first time (or after clearing the <br> database.)<br> - * WIKI_PGSRC can either name a directory or a zip <br> file. In either case<br> - * WIKI_PGSRC is scanned for files -- one file per page.<br> - </em>/<br> -if (!defined('WIKI_PGSRC')) define<br> ('WIKI_PGSRC', "pgsrc"); // Default (old) behavior.<br> -//define('WIKI_PGSRC', 'wiki.zip'); // New style.<br> -//define<br> ('WIKI_PGSRC', '../../../Logs/Hamwiki/hamwiki-<br> 20010830.zip'); // New style.<br> -<br> -/<em><br> - * DEFAULT_WIKI_PGSRC is only used when the <br> language is </em>not<em> the<br> - * default (English) and when reading from a <br> directory: in that case<br> - * some English pages are inserted into the wiki as <br> well.<br> - * DEFAULT_WIKI_PGSRC defines where the English <br> pages reside.<br> - </em>/<br> -// FIXME: is this really needed? Can't we just copy <br> these pages into<br> -// the localized pgsrc?<br> -define('DEFAULT_WIKI_PGSRC', "pgsrc");<br> -// These are the pages which will get loaded from <br> DEFAULT_WIKI_PGSRC. <br> -$GenericPages = array<br> ("ReleaseNotes", "SteveWainstead", "TestPage");<br> -<br> -<br> /////////////////////////////////////////////////////////////<br> ////////<br> -//<br> -// Part Five:<br> -// Mark-up options.<br> -// <br> -<br> /////////////////////////////////////////////////////////////<br> ////////<br> -<br> -// allowed protocols for links - be careful not to <br> allow "javascript:"<br> -// URL of these types will be automatically linked.<br> -// within a named link <span>[name|uri]</span> one more protocol is <br> defined: phpwiki<br> -$AllowedProtocols <br> = "http|https|mailto|ftp|news|nntp|ssh|gopher";<br> -<br> -// URLs ending with the following extension should be <br> inlined as images<br> -$InlineImages = "png|jpg|gif";<br> -<br> -// Perl regexp for WikiNames ("bumpy words")<br> -// (?<!..) & (?!...) used instead of '\b' because \b <br> matches '_' as well<br> -$WikiNameRegexp = "(?<![[:alnum:]])(?:[[:upper:]]<br> [[:lower:]]+){2,}(?![[:alnum:]])";<br> -<br> -// Defaults to '/', but '.' was also used.<br> -if (!defined('SUBPAGE_SEPARATOR')) define<br> ('SUBPAGE_SEPARATOR', '/');<br> -<br> -// InterWiki linking -- wiki-style links to other wikis on <br> the web<br> -//<br> -// The map will be taken from a page name <br> InterWikiMap.<br> -// If that page is not found (or is not locked), or map<br> -// data can not be found in it, then the file specified<br> -// by INTERWIKI_MAP_FILE (if any) will be used.<br> -define('INTERWIKI_MAP_FILE', "lib/interwiki.map");<br> -<br> -// Display a warning if the internal lib/interwiki.map is <br> used, and <br> -// not the public InterWikiMap page. This file is not <br> readable from outside.<br> -//define('WARN_NONPUBLIC_INTERWIKIMAP', false);<br> -<br> -// Regexp used for automatic keyword extraction.<br> -//<br> -// Any links on a page to pages whose names match <br> this regexp will<br> -// be used keywords in the keywords meta tag. (This <br> is an aid to<br> -// classification by search engines.) The value of the <br> match is<br> -// used as the keyword.<br> -//<br> -// The default behavior is to match Category<em> and <br> Topic</em> links.<br> -$keywords = array("Category", "Topic");<br> -$KeywordLinkRegexp = '(?<=^'. join('|^', <br> $keywords) . ')[[:upper:]].*$';<br> -<br> -// Author and Copyright Site Navigation Links<br> -//<br> -// These will be inserted as <link rel> tags in the html <br> header of<br> -// every page, for search engines and for browsers like <br> Mozilla which<br> -// take advantage of link rel site navigation.<br> -//<br> -// If you have your own copyright and contact <br> information pages change<br> -// these as appropriate.<br> -if (!defined('COPYRIGHTPAGE_TITLE')) define<br> ('COPYRIGHTPAGE_TITLE',<br> - "GNU General Public License");<br> -if (!defined('COPYRIGHTPAGE_URL')) define<br> ('COPYRIGHTPAGE_URL',<br> - 'http://www.gnu.org/copyleft/gpl.html#SEC1');<br> -if (!defined('AUTHORPAGE_TITLE')) define<br> ('AUTHORPAGE_TITLE',<br> - "The PhpWiki Programming Team");<br> -if (!defined('AUTHORPAGE_URL')) define<br> ('AUTHORPAGE_URL',<br> -<br> 'http://phpwiki.sourceforge.net/phpwiki/ThePhpWikiP<br> rogrammingTeam');</p> <p>////////////////////////////////////////////////////////////<br> /////////<br> @@ -770,10 +199,10 @@<br> * In most cases the auto-detected values should work <br> fine, so<br> * hopefully you don't need to mess with this section.<br> * - * In case of local overrides of short placeholders, <br> which themselves <br> + * In case of local overrides of short placeholders, <br> which themselves<br> * include index.php, we check for most constants. <br> See '/wiki'.<br> - * We can override DATA_PATH and PHPWIKI_DIR to <br> support multiple phpwiki <br> - * versions (for development), but most likely other <br> values like <br> + * We can override DATA_PATH and PHPWIKI_DIR to <br> support multiple phpwiki<br> + * versions (for development), but most likely other <br> values like<br> * THEME, $LANG and $DbParams for a WikiFarm.<br> *</p> <hr> <p><strong><em>*</em></strong><strong><em>*</em></strong><strong><em>*</em></strong>*/<br> @@ -811,16 +240,16 @@<br> //if (!defined('PHPWIKI_DIR')) define<br> ('PHPWIKI_DIR', '/home/user/public_html/phpwiki');</p> <p>/<em><br> - * PhpWiki will try to use short urls to pages, eg <br> + * PhpWiki will try to use short urls to pages, eg<br> * <a href="http://www.example.com/index.php/HomePage"><a href="http://www.example.com/index.php/HomePage">http://www.example.com/index.php/HomePage</a></a><br> - * If you want to use urls like <br> + * If you want to use urls like<br> * <a href="http://www.example.com/index.php?"><a href="http://www.example.com/index.php?">http://www.example.com/index.php?</a></a><br> pagename=HomePage<br> * then define 'USE_PATH_INFO' as false by <br> uncommenting the line below.<br> * NB: If you are using Apache >= 2.0.30, then you <br> may need to to use<br> * the directive "AcceptPathInfo On" in your Apache <br> configuration file<br> - * (or in an appropriate <.htaccess> file) for the short <br> urls to work:<br> + * (or in an appropriate <.htaccess> file) for the short <br> urls to work:<br> * See <a href="http://httpd.apache.org/docs-"><a href="http://httpd.apache.org/docs-">http://httpd.apache.org/docs-</a></a><br> 2.0/mod/core.html#acceptpathinfo<br> - * <br> + * * See also <br> <a href="http://phpwiki.sourceforge.net/phpwiki/PrettyWiki"><a href="http://phpwiki.sourceforge.net/phpwiki/PrettyWiki">http://phpwiki.sourceforge.net/phpwiki/PrettyWiki</a></a> for <br> more ideas<br> * on prettifying your urls.<br> * @@ -855,58 +284,8 @@<br> </em>/<br> //if (!defined('VIRTUAL_PATH')) define<br> ('VIRTUAL_PATH', '/SomeWiki');</p> <p>-<br> /////////////////////////////////////////////////////////////<br> ////////<br> -//<br> -// Part Seven:<br> -// Miscellaneous settings<br> -//<br> -<br> /////////////////////////////////////////////////////////////<br> ////////</p> <p>-/<em><br> - * Disable HTTP redirects.<br> - * - * (You probably don't need to touch this.)<br> - * - * PhpWiki uses HTTP redirects for some of it's <br> functionality.<br> - * (e.g. after saving changes, PhpWiki redirects your <br> browser to<br> - * view the page you just saved.)<br> - * - * Some web service providers (notably free European <br> Lycos) don't seem to<br> - * allow these redirects. (On Lycos the result in <br> an "Internal Server Error"<br> - * report.) In that case you can set <br> DISABLE_HTTP_REDIRECT to true.<br> - * (In which case, PhpWiki will revert to sneakier tricks <br> to try to<br> - * redirect the browser...)<br> - </em>/<br> -//if (!defined('DISABLE_HTTP_REDIRECT')) define <br> ('DISABLE_HTTP_REDIRECT', true);<br> -<br> -<br> /////////////////////////////////////////////////////////////<br> ///<br> -// Check if we were included by some other wiki <br> version <br> -// (getimg.php, en, de, wiki, ...) or not. <br> -// If the server requested this index.php fire up the <br> code by loading lib/main.php.<br> -// Parallel wiki scripts can now simply <br> include /index.php for the <br> -// main configuration, extend or redefine some <br> settings and <br> -// load lib/main.php by themselves. See the file 'wiki'.<br> -// This overcomes the IndexAsConfigProblem.<br> -<br> /////////////////////////////////////////////////////////////<br> ///<br> -/<em><br> -// Tested: Works with CGI also.<br> -if (defined('VIRTUAL_PATH') and defined<br> ('USE_PATH_INFO')) {<br> - if ($HTTP_SERVER_VARS<span><span>['SCRIPT_NAME']</span></span> == <br> VIRTUAL_PATH) {<br> - include "lib/main.php";<br> - }<br> - elseif (defined('SCRIPT_NAME') and <br> - ($HTTP_SERVER_VARS<span><span>['SCRIPT_NAME']</span></span> == <br> SCRIPT_NAME)) {<br> - include "lib/main.php";<br> - }<br> -} else {<br> - if (defined('SCRIPT_NAME') and <br> - ($HTTP_SERVER_VARS<span><span>['SCRIPT_NAME']</span></span> == <br> SCRIPT_NAME)) {<br> - include "lib/main.php";<br> - } elseif (strstr($HTTP_SERVER_VARS<br> <span><span>['PHP_SELF']</span></span>,'index.php')) {<br> - include "lib/main.php";<br> - }<br> -}<br> -</em>/<br> +include "config.php";<br> include "lib/main.php";</p> <p>// $Log: index.php,v $<br> @@ -939,119 +318,7 @@<br> //<br> // Revision 1.120 2004/02/03 09:45:39 rurban<br> // LDAP cleanup, start of new Pref classes<br> -//<br> -// Revision 1.119 2004/02/01 09:14:10 rurban<br> -// Started with Group_Ldap (not yet ready)<br> -// added new <em>AuthInfo plugin to help in auth <br> problems (warning: may display passwords)<br> -// fixed some configurator vars<br> -// renamed LDAP_AUTH_SEARCH to LDAP_BASE_DN<br> -// changed PHPWIKI_VERSION from 1.3.8a to 1.3.8pre<br> -// USE_DB_SESSION defaults to true on SQL<br> -// changed GROUP_METHOD definition to string, not <br> constants<br> -// changed sample user DBAuthParams from UPDATE <br> to REPLACE to be able to<br> -// create users. (Not to be used with external <br> databases generally, but<br> -// with the default internal user table)<br> -//<br> -// fixed the IndexAsConfigProblem logic. this was <br> flawed:<br> -// scripts which are the same virtual path defined <br> their own lib/main call<br> -// (hmm, have to test this better, <br> phpwiki.sf.net/demo works again)<br> -//<br> -// Revision 1.118 2004/01/28 14:34:13 rurban<br> -// session table takes the common prefix<br> -// + various minor stuff<br> -// reallow password changing<br> -//<br> -// Revision 1.117 2004/01/27 23:25:50 rurban<br> -// added new tables to mysql schema<br> -// fixed default DBAUthParam samples to match these<br> -// added group constants (look terrible, I'd prefer <br> strings instead of constants)<br> -//<br> -// Revision 1.116 2004/01/25 04:21:02 rurban<br> -// WikiUserNew support (temp. ENABLE_USER_NEW <br> constant)<br> -//<br> -// Revision 1.115 2003/12/22 04:58:11 carstenklapp<br> -// Incremented release version.<br> -//<br> -// Revision 1.114 2003/12/05 16:00:42 carstenklapp<br> -// ACK! gettext is not available at this point in <br> index.php.<br> -//<br> -// Revision 1.113 2003/12/05 15:51:37 carstenklapp<br> -// Added note that use of the configurator is <br> depreciated.<br> -//<br> -// Enable localization/gettextification of <br> $KeywordLinkRegexp. (Also, now<br> -// users not familiar with regex can more easily just <br> edit the $keywords<br> -// array).<br> -//<br> -// Added four new constants to define author and <br> copyright link rel~s<br> -// used in html head. This makes it easier to run <br> multiple wikis off of<br> -// one set of code.<br> -//<br> -// Eliminated RECENT_CHANGES constant for RSS <br> auto discovery because it's<br> -// another step to watch out for when running a non-<br> english wiki. Now<br> -// simply defined as </em>("RecentChanges") in head.tmpl <br> itself. Non-standard<br> -// wikis where the RecentChanges page has been <br> named to something else<br> -// will have to modify this in head.tmpl (along with all <br> other places the<br> -// word RecentChanges appears in the code, <br> something that already would<br> -// have had to be done on such a wiki anyway).<br> -//<br> -// Added a little more info and instructions to flesh out:<br> -// DEBUG, WIKI_NAME, ADMIN_USER, <br> $DisabledActions, $DBParams, CHARSET.<br> -//<br> -// A few typos and spelling mistakes corrected, and <br> some text rewrapped.<br> -//<br> -// Revision 1.112 2003/11/17 15:49:21 carstenklapp<br> -// Updated version number to 1.3.7pre (beyond <br> current release<br> -// 1.3.6). Disabled DEBUG output by default (hide <br> DebugInfo, XHTML &<br> -// CSS validator buttons). Note the DebugInfo button <br> remains visible<br> -// for the Admin, and can be accessed by anyone else <br> by adding<br> -// "?action=DebugInfo" to the URL for the occasional <br> use.<br> -//<br> -// Revision 1.111 2003/03/18 21:40:04 dairiki<br> -// Copy Lawrence's memo on <br> USE_PATH_INFO/AcceptPathInfo to configurator.php<br> -// (as promised).<br> -//<br> -// Plus slight clarification of default (auto-detect) <br> behavior.<br> -//<br> -// Revision 1.110 2003/03/18 20:51:10 lakka<br> -// Revised comments on use of USE_PATH_INFO with <br> Apache 2<br> -//<br> -// Revision 1.109 2003/03/17 21:24:50 dairiki<br> -// Fix security bugs in the RawHtml plugin.<br> -//<br> -// Change the default configuration to allow use of <br> plugin, since<br> -// I believe the plugin is now safe for general use. <br> (Raw HTML will only<br> -// work on locked pages.)<br> -//<br> -// Revision 1.108 2003/03/07 22:47:01 dairiki<br> -// A few more if(!defined(...))'s<br> -//<br> -// Revision 1.107 2003/03/07 20:51:54 dairiki<br> -// New feature: Automatic extraction of keywords (for <br> the meta keywords tag)<br> -// from Category<em> and Topic</em> links on each page.<br> -//<br> -// Revision 1.106 2003/03/07 02:48:23 dairiki<br> -// Add option to prevent HTTP redirect.<br> -//<br> -// Revision 1.105 2003/03/04 02:08:08 dairiki<br> -// Fix and document the WIKIDB_NOCACHE_MARKUP <br> config define.<br> -//<br> -// Revision 1.104 2003/02/26 02:55:52 dairiki<br> -// New config settings in index.php to control cache <br> control strictness.<br> -//<br> -// Revision 1.103 2003/02/22 19:43:50 dairiki<br> -// Fix comment regarding connecting to SQL server <br> over a unix socket.<br> -//<br> -// Revision 1.102 2003/02/22 18:53:38 dairiki<br> -// Renamed method Request::compress_output to <br> Request::buffer_output.<br> -//<br> -// Added config option to disable compression.<br> -//<br> -// Revision 1.101 2003/02/21 19:29:30 dairiki<br> -// Update PHPWIKI_VERSION to 1.3.5pre.<br> -//<br> -// Revision 1.100 2003/01/04 03:36:58 wainstead<br> -// Added 'file' as a database type alongside 'dbm'; <br> added cvs log tag<br> -//<br> +</p> <p>// (c-file-style: "gnu")<br> // Local Variables:<br> @@ -1060,5 +327,5 @@<br> // c-basic-offset: 4<br> // c-hanging-comment-ender-p: nil<br> // indent-tabs-mode: nil<br> -// End: <br> +// End:<br> ?><br> Index: lib/main.php<br> ===================================<br> ================================<br> RCS file: /cvsroot/phpwiki/phpwiki/lib/main.php,v<br> retrieving revision 1.115<br> diff -u -r1.115 main.php<br> --- lib/main.php 15 Feb 2004 21:34:37 -0000<br> 1.115<br> +++ lib/main.php 19 Feb 2004 05:39:27 -0000<br> @@ -24,7 +24,7 @@<br> include_once('lib/DB_Session.php');<br> $prefix = isset($GLOBALS<span>['DBParams']</span><br> <span>['prefix']</span>) ? $GLOBALS<span>['DBParams']</span><span>['prefix']</span> : '';<br> $this->_dbsession = & new DB_Session($this-</p> <blockquote> <p>getDbh(),<br> - $prefix . $GLOBALS<br> <span>['DBParams']</span><span>['db_session_table']</span>);<br> + $prefix . 'session');<br> }</p> </blockquote> <div class="codehilite"><pre><span></span><code><span class="w"> </span><span class="err">$</span><span class="n">this</span><span class="o">-></span><span class="n">Request</span><span class="p">();</span><span class="w"></span> </code></pre></div> </title>

Discussion

  • Jason Potkanski

    Jason Potkanski - 2004-02-24
     
  • Jason Potkanski

    Jason Potkanski - 2004-02-24
     
  • Reini Urban

    Reini Urban - 2004-12-06

    Logged In: YES
    user_id=13755

    We have something better now.

    The check is done if config/config.ini exists. and then
    configurator is called which creates the missing
    config/config.ini

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.