3 # MediaWiki web-based config/installation
4 # Copyright (C) 2004 Brion Vibber <brion@pobox.com>, 2006 Rob Church <robchur@gmail.com>
5 # http://www.mediawiki.org/
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License along
18 # with this program; if not, write to the Free Software Foundation, Inc.,
19 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 # http://www.gnu.org/copyleft/gpl.html
22 error_reporting( E_ALL
);
23 header( "Content-type: text/html; charset=utf-8" );
24 @ini_set
( "display_errors", true );
26 # In case of errors, let output be clean.
27 $wgRequestTime = microtime( true );
29 # Attempt to set up the include path, to fix problems with relative includes
30 $IP = dirname( dirname( __FILE__
) );
31 define( 'MW_INSTALL_PATH', $IP );
33 # Define an entry point and include some files
34 define( "MEDIAWIKI", true );
35 define( "MEDIAWIKI_INSTALL", true );
37 // Run version checks before including other files
38 // so people don't see a scary parse error.
39 require_once( "$IP/install-utils.inc" );
40 install_version_checks();
42 require_once( "$IP/includes/Defines.php" );
43 require_once( "$IP/includes/DefaultSettings.php" );
44 require_once( "$IP/includes/AutoLoader.php" );
45 require_once( "$IP/includes/MagicWord.php" );
46 require_once( "$IP/includes/Namespace.php" );
47 require_once( "$IP/includes/ProfilerStub.php" );
48 require_once( "$IP/includes/GlobalFunctions.php" );
49 require_once( "$IP/includes/Hooks.php" );
51 # If we get an exception, the user needs to know
53 $wgShowExceptionDetails = true;
55 ## Databases we support:
58 $ourdb['mysql']['fullname'] = 'MySQL';
59 $ourdb['mysql']['havedriver'] = 0;
60 $ourdb['mysql']['compile'] = 'mysql';
61 $ourdb['mysql']['bgcolor'] = '#ffe5a7';
62 $ourdb['mysql']['rootuser'] = 'root';
64 $ourdb['postgres']['fullname'] = 'PostgreSQL';
65 $ourdb['postgres']['havedriver'] = 0;
66 $ourdb['postgres']['compile'] = 'pgsql';
67 $ourdb['postgres']['bgcolor'] = '#aaccff';
68 $ourdb['postgres']['rootuser'] = 'postgres';
70 $ourdb['sqlite']['fullname'] = 'SQLite';
71 $ourdb['sqlite']['havedriver'] = 0;
72 $ourdb['sqlite']['compile'] = 'pdo_sqlite';
73 $ourdb['sqlite']['bgcolor'] = '#b1ebb1';
74 $ourdb['sqlite']['rootuser'] = '';
76 $ourdb['mssql']['fullname'] = 'MSSQL';
77 $ourdb['mssql']['havedriver'] = 0;
78 $ourdb['mssql']['compile'] = 'mssql not ready'; # Change to 'mssql' after includes/DatabaseMssql.php added;
79 $ourdb['mssql']['bgcolor'] = '#ffc0cb';
80 $ourdb['mssql']['rootuser'] = 'administrator';
83 <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
84 <html xmlns
="http://www.w3.org/1999/xhtml" xml
:lang
="en" lang
="en" dir
="ltr">
86 <meta http
-equiv
="Content-type" content
="text/html; charset=utf-8" />
87 <title
>MediaWiki
<?php
echo( $wgVersion ); ?
> Installation
</title
>
88 <style type
="text/css">
90 @import
"../skins/monobook/main.css";
94 margin
: 1em
0 1em
2.5em
;
101 .config
-section label
.column
{
113 zoom
: 100%
; /* IE hack */
116 .config
-section
.config
-desc
{
118 margin
: 0 0 2em
18em
;
123 .iput
-text
, .iput
-password
{
130 background
-color
: #fff;
138 background
-color
: #FFF0F0;
139 border
: 2px solid red
;
147 list-style
-type
: none
;
148 list-style
-image
: none
;
165 span
.success
-message
{
175 <script type
="text/javascript">
178 <?php
foreach (array_keys($ourdb) as $db) {
179 echo "\n var i = document.getElementById('$db'); if (i) i.style.display='none';";
184 function toggleDBarea(id
,defaultroot
) {
186 var dbarea
= document
.getElementById(id
);
187 if (dbarea
) dbarea
.style
.display
= (dbarea
.style
.display
== 'none') ?
'block' : 'none';
188 var db
= document
.getElementById('RootUser');
190 <?php
foreach (array_keys($ourdb) as $db) {
191 echo " if (id == '$db') { db.value = '".$ourdb[$db]['rootuser']."';}\n";
200 <div id
="globalWrapper">
201 <div id
="column-content">
203 <div id
="bodyContent">
205 <h1
>MediaWiki
<?php
print $wgVersion ?
> Installation
</h1
>
208 $mainListOpened = false; # Is the main list (environement checking) opend ? Used by dieout
210 /* Check for existing configurations and bug out! */
212 if( file_exists( "../LocalSettings.php" ) ) {
213 $script = defined('MW_INSTALL_PHP5_EXT') ?
'index.php5' : 'index.php';
214 dieout( "<p><strong>Setup has completed, <a href='../$script'>your wiki</a> is configured.</strong></p>
215 <p>Please delete the /config directory for extra security.</p>" );
218 if( file_exists( "./LocalSettings.php" ) ) {
219 writeSuccessMessage();
223 if( !is_writable( "." ) ) {
224 dieout( "<h2>Can't write config file, aborting</h2>
226 <p>In order to configure the wiki you have to make the <tt>config</tt> subdirectory
227 writable by the web server. Once configuration is done you'll move the created
228 <tt>LocalSettings.php</tt> to the parent directory, and for added safety you can
229 then remove the <tt>config</tt> subdirectory entirely.</p>
231 <p>To make the directory writable on a Unix/Linux system:</p>
234 cd <i>/path/to/wiki</i>
238 <p>Afterwards retry to start the <a href=\"\">setup</a>.</p>" );
242 require_once( "$IP/install-utils.inc" );
243 require_once( "$IP/maintenance/updaters.inc" );
246 function getEncoded( $data ) {
247 # removing latin1 support, no need...
250 function getSitename() { return $this->getEncoded( $this->Sitename
); }
251 function getSysopName() { return $this->getEncoded( $this->SysopName
); }
252 function getSysopPass() { return $this->getEncoded( $this->SysopPass
); }
254 function setSchema( $schema, $engine ) {
255 $this->DBschema
= $schema;
256 if ( !preg_match( '/^\w*$/', $engine ) ){
259 switch ( $this->DBschema
) {
261 $this->DBTableOptions
= "ENGINE=$engine, DEFAULT CHARSET=utf8";
262 $this->DBmysql5
= 'true';
264 case 'mysql5-binary':
265 $this->DBTableOptions
= "ENGINE=$engine, DEFAULT CHARSET=binary";
266 $this->DBmysql5
= 'true';
269 $this->DBTableOptions
= "TYPE=$engine";
270 $this->DBmysql5
= 'false';
272 $this->DBengine
= $engine;
274 # Set the global for use during install
275 global $wgDBTableOptions;
276 $wgDBTableOptions = $this->DBTableOptions
;
284 <b
>Don
't forget security updates!</b> Keep an eye on the
285 <a href="http://lists.wikimedia.org/mailman/listinfo/mediawiki-announce">low-traffic
286 release announcements mailing list</a>.
291 <h2>Checking environment...</h2>
292 <p><em>Please include all of the lines below when reporting installation problems.</em></p>
293 <ul class="env-check">
295 $mainListOpened = true;
299 define( 'MW_NO_OUTPUT_BUFFER
', 1 );
300 $conf = new ConfigData;
302 install_version_checks();
303 $self = 'Installer
'; # Maintenance script name, to please Setup.php
305 print "<li>PHP " . phpversion() . " installed</li>\n";
307 error_reporting( 0 );
308 $phpdatabases = array();
309 foreach (array_keys($ourdb) as $db) {
310 $compname = $ourdb[$db]['compile
'];
311 if( extension_loaded( $compname ) || ( mw_have_dl() && dl( "{$compname}." . PHP_SHLIB_SUFFIX ) ) ) {
312 array_push($phpdatabases, $db);
313 $ourdb[$db]['havedriver
'] = 1;
316 error_reporting( E_ALL );
318 if (!$phpdatabases) {
319 print "Could not find a suitable database driver!<ul>";
320 foreach (array_keys($ourdb) AS $db) {
321 $comp = $ourdb[$db]['compile
'];
322 $full = $ourdb[$db]['fullname
'];
323 print "<li>For <b>$full</b>, compile PHP using <b>--with-$comp</b>, "
324 ."or install the $comp.so module</li>\n";
330 print "<li>Found database drivers for:";
332 foreach (array_keys($ourdb) AS $db) {
333 if ($ourdb[$db]['havedriver
']) {
334 if ( $DefaultDBtype == '' ) {
335 $DefaultDBtype = $db;
337 print " ".$ourdb[$db]['fullname
'];
342 if( wfIniGetBool( "register_globals" ) ) {
345 <div style="font-size:110%">
346 <strong class="error">Warning:</strong>
347 <strong>PHP's
<tt
><a href
="http://php.net/register_globals">register_globals
</a
></tt
> option is enabled
. Disable it
if you can
.</strong
>
349 MediaWiki will work
, but your server is more exposed to PHP
-based security vulnerabilities
.
356 if( wfIniGetBool( "magic_quotes_runtime" ) ) {
358 ?
><li
class='error'><strong
>Fatal
: <a href
='http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-runtime'>magic_quotes_runtime
</a
> is active
!</strong
>
359 This option corrupts data input unpredictably
; you cannot install
or use
360 MediaWiki unless this option is disabled
.</li
>
364 if( wfIniGetBool( "magic_quotes_sybase" ) ) {
366 ?
><li
class='error'><strong
>Fatal
: <a href
='http://www.php.net/manual/en/ref.sybase.php#ini.magic-quotes-sybase'>magic_quotes_sybase
</a
> is active
!</strong
>
367 This option corrupts data input unpredictably
; you cannot install
or use
368 MediaWiki unless this option is disabled
.</li
>
372 if( wfIniGetBool( "mbstring.func_overload" ) ) {
374 ?
><li
class='error'><strong
>Fatal
: <a href
='http://www.php.net/manual/en/ref.mbstring.php#mbstring.overload'>mbstring
.func_overload
</a
> is active
!</strong
>
375 This option causes errors
and may corrupt data unpredictably
;
376 you cannot install
or use MediaWiki unless this option is disabled
.</li
>
380 if( wfIniGetBool( "zend.ze1_compatibility_mode" ) ) {
382 ?
><li
class="error"><strong
>Fatal
: <a href
="http://www.php.net/manual/en/ini.core.php">zend
.ze1_compatibility_mode
</a
> is active
!</strong
>
383 This option causes horrible bugs with MediaWiki
; you cannot install
or use
384 MediaWiki unless this option is disabled
.</li
>
390 dieout( "Cannot install MediaWiki." );
393 if( wfIniGetBool( "safe_mode" ) ) {
394 $conf->safeMode
= true;
396 <li
><b
class='error'>Warning
:</b
> <strong
>PHP
's
397 <a href='http
://www.php.net/features.safe-mode'>safe mode</a> is active.</strong>
398 You may have problems caused by this
, particularly
if using image uploads
.
402 $conf->safeMode
= false;
405 $sapi = php_sapi_name();
406 print "<li>PHP server API is $sapi; ";
407 $script = defined('MW_INSTALL_PHP5_EXT') ?
'index.php5' : 'index.php';
408 if( $wgUsePathInfo ) {
409 print "ok, using pretty URLs (<tt>$script/Page_Title</tt>)";
411 print "using ugly URLs (<tt>$script?title=Page_Title</tt>)";
415 $conf->xml
= function_exists( "utf8_encode" );
417 print "<li>Have XML / Latin1-UTF-8 conversion support.</li>\n";
419 dieout( "PHP's XML module is missing; the wiki requires functions in
420 this module and won't work in this configuration.
421 If you're running Mandrake, install the php-xml package." );
424 # Check for session support
425 if( !function_exists( 'session_name' ) )
426 dieout( "PHP's session module is missing. MediaWiki requires session support in order to function." );
428 # session.save_path doesn't *have* to be set, but if it is, and it's
429 # not valid/writable/etc. then it can cause problems
430 $sessionSavePath = mw_get_session_save_path();
431 $ssp = htmlspecialchars( $sessionSavePath );
432 # Warn the user if it's not set, but let them proceed
433 if( !$sessionSavePath ) {
434 print "<li><strong>Warning:</strong> A value for <tt>session.save_path</tt>
435 has not been set in PHP.ini. If the default value causes problems with
436 saving session data, set it to a valid path which is read/write/execute
437 for the user your web server is running under.</li>";
438 } elseif ( is_dir( $sessionSavePath ) && is_writable( $sessionSavePath ) ) {
439 # All good? Let the user know
440 print "<li>Session save path (<tt>{$ssp}</tt>) appears to be valid.</li>";
442 # Something not right? Warn the user, but let them proceed
443 print "<li><strong>Warning:</strong> Your <tt>session.save_path</tt> value (<tt>{$ssp}</tt>)
444 appears to be invalid or is not writable. PHP needs to be able to save data to
445 this location for correct session operation.</li>";
448 # Check for PCRE support
449 if( !function_exists( 'preg_match' ) )
450 dieout( "The PCRE support module appears to be missing. MediaWiki requires the
451 Perl-compatible regular expression functions." );
453 $memlimit = ini_get( "memory_limit" );
454 $conf->raiseMemory
= false;
455 if( empty( $memlimit ) ||
$memlimit == -1 ) {
456 print "<li>PHP is configured with no <tt>memory_limit</tt>.</li>\n";
458 print "<li>PHP's <tt>memory_limit</tt> is " . htmlspecialchars( $memlimit ) . ". ";
459 $n = intval( $memlimit );
460 if( preg_match( '/^([0-9]+)[Mm]$/', trim( $memlimit ), $m ) ) {
461 $n = intval( $m[1] * (1024*1024) );
463 if( $n < 20*1024*1024 ) {
464 print "Attempting to raise limit to 20M... ";
465 if( false === ini_set( "memory_limit", "20M" ) ) {
466 print "failed.<br /><b>" . htmlspecialchars( $memlimit ) . " seems too low, installation may fail!</b>";
468 $conf->raiseMemory
= true;
475 $conf->turck
= function_exists( 'mmcache_get' );
476 if ( $conf->turck
) {
477 print "<li><a href=\"http://turck-mmcache.sourceforge.net/\">Turck MMCache</a> installed</li>\n";
480 $conf->xcache
= function_exists( 'xcache_get' );
482 print "<li><a href=\"http://trac.lighttpd.net/xcache/\">XCache</a> installed</li>\n";
484 $conf->apc
= function_exists('apc_fetch');
486 print "<li><a href=\"http://www.php.net/apc\">APC</a> installed</li>\n";
489 $conf->eaccel
= function_exists( 'eaccelerator_get' );
490 if ( $conf->eaccel
) {
491 $conf->turck
= 'eaccelerator';
492 print "<li><a href=\"http://eaccelerator.sourceforge.net/\">eAccelerator</a> installed</li>\n";
495 $conf->dba
= function_exists( 'dba_open' );
497 if( !( $conf->turck ||
$conf->eaccel ||
$conf->apc ||
$conf->xcache
) ) {
498 echo( '<li>Couldn\'t find <a href="http://turck-mmcache.sourceforge.net">Turck MMCache</a>,
499 <a href="http://eaccelerator.sourceforge.net">eAccelerator</a>,
500 <a href="http://www.php.net/apc">APC</a> or <a href="http://trac.lighttpd.net/xcache/">XCache</a>;
501 cannot use these for object caching.</li>' );
504 $conf->diff3
= false;
505 $diff3locations = array_merge(
512 explode( PATH_SEPARATOR
, getenv( "PATH" ) ) );
513 $diff3names = array( "gdiff3", "diff3", "diff3.exe" );
515 $diff3versioninfo = array( '$1 --version 2>&1', 'diff3 (GNU diffutils)' );
516 foreach ($diff3locations as $loc) {
517 $exe = locate_executable($loc, $diff3names, $diff3versioninfo);
518 if ($exe !== false) {
525 print "<li>Found GNU diff3: <tt>$conf->diff3</tt>.</li>";
527 print "<li>GNU diff3 not found.</li>";
529 $conf->ImageMagick
= false;
530 $imcheck = array( "/usr/bin", "/opt/csw/bin", "/usr/local/bin", "/sw/bin", "/opt/local/bin" );
531 foreach( $imcheck as $dir ) {
532 $im = "$dir/convert";
533 if( @file_exists
( $im ) ) {
534 print "<li>Found ImageMagick: <tt>$im</tt>; image thumbnailing will be enabled if you enable uploads.</li>\n";
535 $conf->ImageMagick
= $im;
540 $conf->HaveGD
= function_exists( "imagejpeg" );
541 if( $conf->HaveGD
) {
542 print "<li>Found GD graphics library built-in";
543 if( !$conf->ImageMagick
) {
544 print ", image thumbnailing will be enabled if you enable uploads";
548 if( !$conf->ImageMagick
) {
549 print "<li>Couldn't find GD library or ImageMagick; image thumbnailing disabled.</li>\n";
553 $conf->IP
= dirname( dirname( __FILE__
) );
554 print "<li>Installation directory: <tt>" . htmlspecialchars( $conf->IP
) . "</tt></li>\n";
557 // PHP_SELF isn't available sometimes, such as when PHP is CGI but
558 // cgi.fix_pathinfo is disabled. In that case, fall back to SCRIPT_NAME
559 // to get the path to the current script... hopefully it's reliable. SIGH
560 $path = ($_SERVER["PHP_SELF"] === '')
561 ?
$_SERVER["SCRIPT_NAME"]
562 : $_SERVER["PHP_SELF"];
564 $conf->ScriptPath
= preg_replace( '{^(.*)/config.*$}', '$1', $path );
565 print "<li>Script URI path: <tt>" . htmlspecialchars( $conf->ScriptPath
) . "</tt></li>\n";
569 // We may be installing from *.php5 extension file, if so, print message
570 $conf->ScriptExtension
= '.php';
571 if (defined('MW_INSTALL_PHP5_EXT')) {
572 $conf->ScriptExtension
= '.php5';
573 print "<li>Installing MediaWiki with <tt>php5</tt> file extensions</li>\n";
575 print "<li>Installing MediaWiki with <tt>php</tt> file extensions</li>\n";
579 print "<li style='font-weight:bold;color:green;font-size:110%'>Environment checked. You can install MediaWiki.</li>\n";
580 $conf->posted
= ($_SERVER["REQUEST_METHOD"] == "POST");
582 $conf->Sitename
= ucfirst( importPost( "Sitename", "" ) );
583 $defaultEmail = empty( $_SERVER["SERVER_ADMIN"] )
585 : $_SERVER["SERVER_ADMIN"];
586 $conf->EmergencyContact
= importPost( "EmergencyContact", $defaultEmail );
587 $conf->DBtype
= importPost( "DBtype", $DefaultDBtype );
589 $conf->DBserver
= importPost( "DBserver", "localhost" );
590 $conf->DBname
= importPost( "DBname", "wikidb" );
591 $conf->DBuser
= importPost( "DBuser", "wikiuser" );
592 $conf->DBpassword
= importPost( "DBpassword" );
593 $conf->DBpassword2
= importPost( "DBpassword2" );
594 $conf->SysopName
= importPost( "SysopName", "WikiSysop" );
595 $conf->SysopPass
= importPost( "SysopPass" );
596 $conf->SysopPass2
= importPost( "SysopPass2" );
597 $conf->RootUser
= importPost( "RootUser", "root" );
598 $conf->RootPW
= importPost( "RootPW", "" );
599 $useRoot = importCheck( 'useroot', false );
600 $conf->LanguageCode
= importPost( "LanguageCode", "en" );
602 $conf->DBprefix
= importPost( "DBprefix" );
604 importPost( "DBschema", "mysql5-binary" ),
605 importPost( "DBengine", "InnoDB" ) );
607 ## Postgres specific:
608 $conf->DBport
= importPost( "DBport", "5432" );
609 $conf->DBmwschema
= importPost( "DBmwschema", "mediawiki" );
610 $conf->DBts2schema
= importPost( "DBts2schema", "public" );
613 $conf->SQLiteDataDir
= importPost( "SQLiteDataDir", "" );
616 // We need a second field so it doesn't overwrite the MySQL one
617 $conf->DBprefix2
= importPost( "DBprefix2" );
619 $conf->ShellLocale
= getShellLocale( $conf->LanguageCode
);
621 /* Check for validity */
624 if( preg_match( '/^$|^mediawiki$|#/i', $conf->Sitename
) ) {
625 $errs["Sitename"] = "Must not be blank or \"MediaWiki\" and may not contain \"#\"";
627 if( $conf->DBuser
== "" ) {
628 $errs["DBuser"] = "Must not be blank";
630 if( ($conf->DBtype
== 'mysql') && (strlen($conf->DBuser
) > 16) ) {
631 $errs["DBuser"] = "Username too long";
633 if( $conf->DBpassword
== "" && $conf->DBtype
!= "postgres" ) {
634 $errs["DBpassword"] = "Must not be blank";
636 if( $conf->DBpassword
!= $conf->DBpassword2
) {
637 $errs["DBpassword2"] = "Passwords don't match!";
639 if( !preg_match( '/^[A-Za-z_0-9]*$/', $conf->DBprefix
) ) {
640 $errs["DBprefix"] = "Invalid table prefix";
643 error_reporting( E_ALL
);
646 * Initialise $wgLang and $wgContLang to something so we can
647 * call case-folding methods. Per Brion, this is English for
648 * now, although we could be clever and initialise to the
649 * user-selected language.
651 $wgContLang = Language
::factory( 'en' );
652 $wgLang = $wgContLang;
655 * We're messing about with users, so we need a stub
656 * authentication plugin...
658 $wgAuth = new AuthPlugin();
661 * Validate the initial administrator account; username,
662 * password checks, etc.
664 if( $conf->SysopName
) {
665 # Check that the user can be created
666 $u = User
::newFromName( $conf->SysopName
);
667 if( is_a($u, 'User') ) { // please do not use instanceof, it breaks PHP4
668 # Various password checks
669 if( $conf->SysopPass
!= '' ) {
670 if( $conf->SysopPass
== $conf->SysopPass2
) {
671 if( !$u->isValidPassword( $conf->SysopPass
) ) {
672 $errs['SysopPass'] = "Bad password";
675 $errs['SysopPass2'] = "Passwords don't match";
678 $errs['SysopPass'] = "Cannot be blank";
682 $errs['SysopName'] = "Bad username";
686 $conf->License
= importRequest( "License", "none" );
687 if( $conf->License
== "gfdl" ) {
688 $conf->RightsUrl
= "http://www.gnu.org/copyleft/fdl.html";
689 $conf->RightsText
= "GNU Free Documentation License 1.2";
690 $conf->RightsCode
= "gfdl";
691 $conf->RightsIcon
= '${wgScriptPath}/skins/common/images/gnu-fdl.png';
692 } elseif( $conf->License
== "none" ) {
693 $conf->RightsUrl
= $conf->RightsText
= $conf->RightsCode
= $conf->RightsIcon
= "";
694 } elseif( $conf->License
== "pd" ) {
695 $conf->RightsUrl
= "http://en.wikipedia.org/wiki/Public_domain";
696 $conf->RightsText
= "Public Domain";
697 $conf->RightsCode
= "pd";
698 $conf->RightsIcon
= '${wgScriptPath}/skins/common/images/public-domain.png';
700 $conf->RightsUrl
= importRequest( "RightsUrl", "" );
701 $conf->RightsText
= importRequest( "RightsText", "" );
702 $conf->RightsCode
= importRequest( "RightsCode", "" );
703 $conf->RightsIcon
= importRequest( "RightsIcon", "" );
706 $conf->Shm
= importRequest( "Shm", "none" );
707 $conf->MCServers
= importRequest( "MCServers" );
709 /* Test memcached servers */
711 if ( $conf->Shm
== 'memcached' && $conf->MCServers
) {
712 $conf->MCServerArray
= array_map( 'trim', explode( ',', $conf->MCServers
) );
713 foreach ( $conf->MCServerArray
as $server ) {
714 $error = testMemcachedServer( $server );
716 $errs["MCServers"] = $error;
720 } else if ( $conf->Shm
== 'memcached' ) {
721 $errs["MCServers"] = "Please specify at least one server if you wish to use memcached";
724 /* default values for installation */
725 $conf->Email
= importRequest("Email", "email_enabled");
726 $conf->Emailuser
= importRequest("Emailuser", "emailuser_enabled");
727 $conf->Enotif
= importRequest("Enotif", "enotif_allpages");
728 $conf->Eauthent
= importRequest("Eauthent", "eauthent_enabled");
730 if( $conf->posted
&& ( 0 == count( $errs ) ) ) {
731 do { /* So we can 'continue' to end prematurely */
732 $conf->Root
= ($conf->RootPW
!= "");
734 /* Load up the settings and get installin' */
735 $local = writeLocalSettings( $conf );
736 echo "<li style=\"list-style: none\">\n";
737 echo "<p><b>Generating configuration file...</b></p>\n";
740 $wgCommandLineMode = false;
742 $ok = eval( $local );
743 if( $ok === false ) {
744 dieout( "<p>Errors in generated configuration; " .
745 "most likely due to a bug in the installer... " .
746 "Config file was: </p>" .
748 htmlspecialchars( $local ) .
751 $conf->DBtypename
= '';
752 foreach (array_keys($ourdb) as $db) {
753 if ($conf->DBtype
=== $db)
754 $conf->DBtypename
= $ourdb[$db]['fullname'];
756 if ( ! strlen($conf->DBtype
)) {
757 $errs["DBpicktype"] = "Please choose a database type";
761 if (! $conf->DBtypename
) {
762 $errs["DBtype"] = "Unknown database type '$conf->DBtype'";
765 print "<li>Database type: {$conf->DBtypename}</li>\n";
766 $dbclass = 'Database'.ucfirst($conf->DBtype
);
767 $wgDBtype = $conf->DBtype
;
768 $wgDBadminuser = "root";
769 $wgDBadminpassword = $conf->RootPW
;
772 $wgDBprefix = $conf->DBprefix
;
774 ## Postgres specific:
775 $wgDBport = $conf->DBport
;
776 $wgDBmwschema = $conf->DBmwschema
;
777 $wgDBts2schema = $conf->DBts2schema
;
779 if( $conf->DBprefix2
!= '' ) {
781 $wgDBprefix = $conf->DBprefix2
;
784 $wgCommandLineMode = true;
785 if (! defined ( 'STDERR' ) )
786 define( 'STDERR', fopen("php://stderr", "wb"));
787 $wgUseDatabaseMessages = false; /* FIXME: For database failure */
788 require_once( "$IP/includes/Setup.php" );
791 $wgTitle = Title
::newFromText( "Installation script" );
792 error_reporting( E_ALL
);
793 print "<li>Loading class: $dbclass</li>\n";
796 if( $conf->DBtype
== 'mysql' ) {
797 $mysqlOldClient = version_compare( mysql_get_client_info(), "4.1.0", "lt" );
798 if( $mysqlOldClient ) {
799 print "<li><b>PHP is linked with old MySQL client libraries. If you are
800 using a MySQL 4.1 server and have problems connecting to the database,
801 see <a href='http://dev.mysql.com/doc/mysql/en/old-client.html'
802 >http://dev.mysql.com/doc/mysql/en/old-client.html</a> for help.</b></li>\n";
804 $ok = true; # Let's be optimistic
806 # Decide if we're going to use the superuser or the regular database user
807 $conf->Root
= $useRoot;
809 $db_user = $conf->RootUser
;
810 $db_pass = $conf->RootPW
;
812 $db_user = $wgDBuser;
813 $db_pass = $wgDBpassword;
817 echo( "<li>Attempting to connect to database server as $db_user..." );
818 $wgDatabase = Database
::newFromParams( $wgDBserver, $db_user, $db_pass, '', 1 );
820 # Check the connection and respond to errors
821 if( $wgDatabase->isOpen() ) {
824 $wgDBadminuser = $db_user;
825 $wgDBadminpassword = $db_pass;
826 echo( "success.</li>\n" );
827 $wgDatabase->ignoreErrors( true );
828 $myver = $wgDatabase->getServerVersion();
830 # There were errors, report them and back out
832 $errno = mysql_errno();
833 $errtx = htmlspecialchars( mysql_error() );
837 echo( "failed due to authentication errors. Check passwords.</li>" );
839 # The superuser details are wrong
840 $errs["RootUser"] = "Check username";
841 $errs["RootPW"] = "and password";
843 # The regular user details are wrong
844 $errs["DBuser"] = "Check username";
845 $errs["DBpassword"] = "and password";
851 # General connection problem
852 echo( "failed with error [$errno] $errtx.</li>\n" );
853 $errs["DBserver"] = "Connection failed";
858 if( !$ok ) { continue; }
861 error_reporting( E_ALL
);
863 ## Possible connect as a superuser
864 if( $useRoot && $conf->DBtype
!= 'sqlite' ) {
865 $wgDBsuperuser = $conf->RootUser
;
866 echo( "<li>Attempting to connect to database \"postgres\" as superuser \"$wgDBsuperuser\"..." );
867 $wgDatabase = $dbc->newFromParams($wgDBserver, $wgDBsuperuser, $conf->RootPW
, "postgres", 1);
868 if (!$wgDatabase->isOpen()) {
869 print " error: " . $wgDatabase->lastError() . "</li>\n";
870 $errs["DBserver"] = "Could not connect to database as superuser";
871 $errs["RootUser"] = "Check username";
872 $errs["RootPW"] = "and password";
875 $wgDatabase->initial_setup($conf->RootPW
, 'postgres');
877 echo( "<li>Attempting to connect to database \"$wgDBname\" as \"$wgDBuser\"..." );
878 $wgDatabase = $dbc->newFromParams($wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname, 1);
879 if (!$wgDatabase->isOpen()) {
880 print " error: " . $wgDatabase->lastError() . "</li>\n";
882 $myver = $wgDatabase->getServerVersion();
884 if (is_callable(array($wgDatabase, 'initial_setup'))) $wgDatabase->initial_setup('', $wgDBname);
887 if ( !$wgDatabase->isOpen() ) {
888 $errs["DBserver"] = "Couldn't connect to database";
892 print "<li>Connected to $myver";
893 if ($conf->DBtype
== 'mysql') {
894 if( version_compare( $myver, "4.0.14" ) < 0 ) {
896 dieout( "-- mysql 4.0.14 or later required. Aborting." );
898 $mysqlNewAuth = version_compare( $myver, "4.1.0", "ge" );
899 if( $mysqlNewAuth && $mysqlOldClient ) {
900 print "; <b class='error'>You are using MySQL 4.1 server, but PHP is linked
901 to old client libraries; if you have trouble with authentication, see
902 <a href='http://dev.mysql.com/doc/mysql/en/old-client.html'
903 >http://dev.mysql.com/doc/mysql/en/old-client.html</a> for help.</b>";
906 if( $mysqlNewAuth ) {
907 print "; enabling MySQL 4.1/5.0 charset mode";
909 print "; <b class='error'>MySQL 4.1/5.0 charset mode enabled,
910 but older version detected; will likely fail.</b>";
915 @$sel = $wgDatabase->selectDB( $wgDBname );
917 print "<li>Database <tt>" . htmlspecialchars( $wgDBname ) . "</tt> exists</li>\n";
919 $err = mysql_errno();
920 $databaseSafe = htmlspecialchars( $wgDBname );
921 if( $err == 1102 /* Invalid database name */ ) {
922 print "<ul><li><strong>{$databaseSafe}</strong> is not a valid database name.</li></ul>";
924 } elseif( $err != 1049 /* Database doesn't exist */ ) {
925 print "<ul><li>Error selecting database <strong>{$databaseSafe}</strong>: {$err} ";
926 print htmlspecialchars( mysql_error() ) . "</li></ul>";
929 print "<li>Attempting to create database...</li>";
930 $res = $wgDatabase->query( "CREATE DATABASE `$wgDBname`" );
932 print "<li>Couldn't create database <tt>" .
933 htmlspecialchars( $wgDBname ) .
934 "</tt>; try with root access or check your username/pass.</li>\n";
935 $errs["RootPW"] = "<- Enter";
938 print "<li>Created database <tt>" . htmlspecialchars( $wgDBname ) . "</tt></li>\n";
940 $wgDatabase->selectDB( $wgDBname );
942 else if ($conf->DBtype
== 'postgres') {
943 if( version_compare( $myver, "PostgreSQL 8.0" ) < 0 ) {
944 dieout( "<b>Postgres 8.0 or later is required</b>. Aborting." );
948 if( $wgDatabase->tableExists( "cur" ) ||
$wgDatabase->tableExists( "revision" ) ) {
949 print "<li>There are already MediaWiki tables in this database. Checking if updates are needed...</li>\n";
951 if ( $conf->DBtype
== 'mysql') {
952 # Determine existing default character set
953 if ( $wgDatabase->tableExists( "revision" ) ) {
954 $revision = $wgDatabase->escapeLike( $conf->DBprefix
. 'revision' );
955 $res = $wgDatabase->query( "SHOW TABLE STATUS LIKE '$revision'" );
956 $row = $wgDatabase->fetchObject( $res );
958 echo "<li>SHOW TABLE STATUS query failed!</li>\n";
959 $existingSchema = false;
960 $existingEngine = false;
962 if ( preg_match( '/^latin1/', $row->Collation
) ) {
963 $existingSchema = 'mysql4';
964 } elseif ( preg_match( '/^utf8/', $row->Collation
) ) {
965 $existingSchema = 'mysql5';
966 } elseif ( preg_match( '/^binary/', $row->Collation
) ) {
967 $existingSchema = 'mysql5-binary';
969 $existingSchema = false;
970 echo "<li><strong>Warning:</strong> Unrecognised existing collation</li>\n";
972 if ( isset( $row->Engine
) ) {
973 $existingEngine = $row->Engine
;
975 $existingEngine = $row->Type
;
978 if ( $existingSchema && $existingSchema != $conf->DBschema
) {
979 print "<li><strong>Warning:</strong> you requested the {$conf->DBschema} schema, " .
980 "but the existing database has the $existingSchema schema. This upgrade script ".
981 "can't convert it, so it will remain $existingSchema.</li>\n";
982 $conf->setSchema( $existingSchema, $conf->DBengine
);
984 if ( $existingEngine && $existingEngine != $conf->DBengine
) {
985 print "<li><strong>Warning:</strong> you requested the {$conf->DBengine} storage " .
986 "engine, but the existing database uses the $existingEngine engine. This upgrade " .
987 "script can't convert it, so it will remain $existingEngine.</li>\n";
988 $conf->setSchema( $conf->DBschema
, $existingEngine );
992 # Create user if required
994 $conn = $dbc->newFromParams( $wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname, 1 );
995 if ( $conn->isOpen() ) {
996 print "<li>DB user account ok</li>\n";
999 print "<li>Granting user permissions...";
1000 if( $mysqlOldClient && $mysqlNewAuth ) {
1001 print " <b class='error'>If the next step fails, see <a href='http://dev.mysql.com/doc/mysql/en/old-client.html'>http://dev.mysql.com/doc/mysql/en/old-client.html</a> for help.</b>";
1004 dbsource( "../maintenance/users.sql", $wgDatabase );
1008 print "</ul><pre>\n";
1014 print "<ul><li>Finished update checks.</li>\n";
1016 # Determine available storage engines if possible
1017 if ( $conf->DBtype
== 'mysql' && version_compare( $myver, "4.1.2", "ge" ) ) {
1018 $res = $wgDatabase->query( 'SHOW ENGINES' );
1020 while ( $row = $wgDatabase->fetchObject( $res ) ) {
1021 if ( $row->Engine
== $conf->DBengine
) {
1026 $wgDatabase->freeResult( $res );
1027 if ( !$found && $conf->DBengine
!= 'MyISAM' ) {
1028 echo "<li><strong>Warning:</strong> {$conf->DBengine} storage engine not available, " .
1029 "using MyISAM instead</li>\n";
1030 $conf->setSchema( $conf->DBschema
, 'MyISAM' );
1034 # FIXME: Check for errors
1035 print "<li>Creating tables...";
1036 if ($conf->DBtype
== 'mysql') {
1037 dbsource( "../maintenance/tables.sql", $wgDatabase );
1038 dbsource( "../maintenance/interwiki.sql", $wgDatabase );
1039 } elseif (is_callable(array($wgDatabase, 'setup_database'))) {
1040 $wgDatabase->setup_database();
1043 $errs["DBtype"] = "Do not know how to handle database type '$conf->DBtype'";
1047 print " done.</li>\n";
1049 print "<li>Initializing statistics...</li>\n";
1050 $wgDatabase->insert( 'site_stats',
1051 array ( 'ss_row_id' => 1,
1052 'ss_total_views' => 0,
1053 'ss_total_edits' => 1, # Main page first edit
1054 'ss_good_articles' => 0, # Main page is not a good article - no internal link
1055 'ss_total_pages' => 1, # Main page
1056 'ss_users' => $conf->SysopName ?
1 : 0, # Sysop account, if created
1057 'ss_admins' => $conf->SysopName ?
1 : 0, # Sysop account, if created
1058 'ss_images' => 0 ) );
1060 # Set up the "regular user" account *if we can, and if we need to*
1061 if( $conf->Root
and $conf->DBtype
== 'mysql') {
1063 $wgDatabase2 = $dbc->newFromParams( $wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname, 1 );
1064 if( $wgDatabase2->isOpen() ) {
1065 # Nope, just close the test connection and continue
1066 $wgDatabase2->close();
1067 echo( "<li>User $wgDBuser exists. Skipping grants.</li>\n" );
1069 # Yes, so run the grants
1070 echo( "<li>Granting user permissions to $wgDBuser on $wgDBname..." );
1071 dbsource( "../maintenance/users.sql", $wgDatabase );
1072 echo( "success.</li>\n" );
1076 if( $conf->SysopName
) {
1077 $u = User
::newFromName( $conf->getSysopName() );
1079 print "<li><strong class=\"error\">Warning:</strong> Skipped sysop account creation - invalid username!</li>\n";
1081 else if ( 0 == $u->idForName() ) {
1082 $u->addToDatabase();
1083 $u->setPassword( $conf->getSysopPass() );
1086 $u->addGroup( "sysop" );
1087 $u->addGroup( "bureaucrat" );
1089 print "<li>Created sysop account <tt>" .
1090 htmlspecialchars( $conf->SysopName
) . "</tt>.</li>\n";
1092 print "<li>Could not create user - already exists!</li>\n";
1095 print "<li>Skipped sysop account creation, no name given.</li>\n";
1098 $titleobj = Title
::newFromText( wfMsgNoDB( "mainpage" ) );
1099 $article = new Article( $titleobj );
1100 $newid = $article->insertOn( $wgDatabase );
1101 $revision = new Revision( array(
1103 'text' => wfMsg( 'mainpagetext' ) . "\n\n" . wfMsgNoTrans( 'mainpagedocfooter' ),
1106 'user_text' => 'MediaWiki default',
1108 $revid = $revision->insertOn( $wgDatabase );
1109 $article->updateRevisionOn( $wgDatabase, $revision );
1112 /* Write out the config file now that all is well */
1113 print "<li style=\"list-style: none\">\n";
1114 print "<p>Creating LocalSettings.php...</p>\n\n";
1115 $localSettings = "<" . "?php$endl$local";
1116 // Fix up a common line-ending problem (due to CVS on Windows)
1117 $localSettings = str_replace( "\r\n", "\n", $localSettings );
1118 $f = fopen( "LocalSettings.php", 'xt' );
1122 dieout( "<p>Couldn't write out LocalSettings.php. Check that the directory permissions are correct and that there isn't already a file of that name here...</p>\n" .
1123 "<p>Here's the file that would have been written, try to paste it into place manually:</p>\n" .
1124 "<pre>\n" . htmlspecialchars( $localSettings ) . "</pre>\n" );
1126 if(fwrite( $f, $localSettings ) ) {
1129 writeSuccessMessage();
1133 dieout( "<p class='error'>An error occured while writing the config/LocalSettings.php file. Check user rights and disk space then try again.</p></li>\n" );
1140 $mainListOpened = false;
1142 if( count( $errs ) ) {
1143 /* Display options form */
1145 if( $conf->posted
) {
1146 echo "<p class='error-top'>Something's not quite right yet; make sure everything below is filled out correctly.</p>\n";
1150 <form action
="<?php echo defined('MW_INSTALL_PHP5_EXT') ? 'index.php5' : 'index.php'; ?>" name
="config" method
="post">
1152 <h2
>Site config
</h2
>
1154 <div
class="config-section">
1155 <div
class="config-input">
1156 <?php
aField( $conf, "Sitename", "Wiki name:" ); ?
>
1158 <p
class="config-desc">
1159 Preferably a short word without punctuation
, i
.e
. "Wikipedia".<br
/>
1160 Will appear
as the
namespace name
for "meta" pages
, and throughout the
interface.
1162 <div
class="config-input"><?php
aField( $conf, "EmergencyContact", "Contact e-mail:" ); ?
></div
>
1163 <p
class="config-desc">
1164 Displayed to users in some error messages
, used
as the
return address
for password reminders
, and used
as the
default sender address of e
-mail notifications
.
1167 <div
class="config-input">
1168 <label
class='column' for="LanguageCode">Language
:</label
>
1169 <select id
="LanguageCode" name
="LanguageCode"><?php
1170 $list = getLanguageList();
1171 foreach( $list as $code => $name ) {
1172 $sel = ($code == $conf->LanguageCode
) ?
'selected="selected"' : '';
1173 echo "\n\t\t<option value=\"$code\" $sel>$name</option>";
1179 <p
class="config-desc">
1180 Select the language
for your wiki
's interface. Some localizations aren't fully complete
. Unicode (UTF
-8) is used
for all localizations
.
1183 <div
class="config-input">
1184 <label
class='column'>Copyright
/license
:</label
>
1187 <li
><?php
aField( $conf, "License", "No license metadata", "radio", "none" ); ?
></li
>
1188 <li
><?php
aField( $conf, "License", "Public Domain", "radio", "pd" ); ?
></li
>
1189 <li
><?php
aField( $conf, "License", "GNU Free Documentation License 1.2 (Wikipedia-compatible)", "radio", "gfdl" ); ?
></li
>
1191 aField( $conf, "License", "A Creative Commons license - ", "radio", "cc" );
1192 $partner = "MediaWiki";
1193 $script = defined('MW_INSTALL_PHP5_EXT') ?
'index.php5' : 'index.php';
1194 $exit = urlencode( "$wgServer{$conf->ScriptPath}/config/$script?License=cc&RightsUrl=[license_url]&RightsText=[license_name]&RightsCode=[license_code]&RightsIcon=[license_button]" );
1195 $icon = urlencode( "$wgServer$wgUploadPath/wiki.png" );
1196 $ccApp = htmlspecialchars( "http://creativecommons.org/license/?partner=$partner&exit_url=$exit&partner_icon_url=$icon" );
1197 print "<a href=\"$ccApp\" target='_blank'>choose</a>";
1198 if( $conf->License
== "cc" ) { ?
>
1200 <li
><?php
aField( $conf, "RightsIcon", "<img src=\"" . htmlspecialchars( $conf->RightsIcon
) . "\" alt='(Creative Commons icon)' />", "hidden" ); ?
></li
>
1201 <li
><?php
aField( $conf, "RightsText", htmlspecialchars( $conf->RightsText
), "hidden" ); ?
></li
>
1202 <li
><?php
aField( $conf, "RightsCode", "code: " . htmlspecialchars( $conf->RightsCode
), "hidden" ); ?
></li
>
1203 <li
><?php
aField( $conf, "RightsUrl", "<a href=\"" . htmlspecialchars( $conf->RightsUrl
) . "\">" . htmlspecialchars( $conf->RightsUrl
) . "</a>", "hidden" ); ?
></li
>
1209 <p
class="config-desc">
1210 A notice
, icon
, and machine
-readable copyright metadata will be displayed
for the license you pick
.
1214 <div
class="config-input">
1215 <?php
aField( $conf, "SysopName", "Admin username:" ) ?
>
1217 <div
class="config-input">
1218 <?php
aField( $conf, "SysopPass", "Password:", "password" ) ?
>
1220 <div
class="config-input">
1221 <?php
aField( $conf, "SysopPass2", "Password confirm:", "password" ) ?
>
1223 <p
class="config-desc">
1224 An admin can lock
/delete pages
, block users from editing
, and do other maintenance tasks
.<br
/>
1225 A
new account will be added only when creating a
new wiki database
.
1227 The password cannot be the same
as the username
.
1230 <div
class="config-input">
1231 <label
class='column'>Object caching
:</label
>
1234 <li
><?php
aField( $conf, "Shm", "No caching", "radio", "none" ); ?
></li
>
1236 if ( $conf->turck
) {
1238 aField( $conf, "Shm", "Turck MMCache", "radio", "turck" );
1241 if( $conf->xcache
) {
1243 aField( $conf, 'Shm', 'XCache', 'radio', 'xcache' );
1248 aField( $conf, "Shm", "APC", "radio", "apc" );
1251 if ( $conf->eaccel
) {
1253 aField( $conf, "Shm", "eAccelerator", "radio", "eaccel" );
1258 aField( $conf, "Shm", "DBA (not recommended)", "radio", "dba" );
1262 <li
><?php
aField( $conf, "Shm", "Memcached", "radio", "memcached" ); ?
></li
>
1264 <div style
="clear:left"><?php
aField( $conf, "MCServers", "Memcached servers:", "text" ) ?
></div
>
1266 <p
class="config-desc">
1267 An
object caching system such
as memcached will provide a significant performance boost
,
1268 but needs to be installed
. Provide the server addresses
and ports in a comma
-separated
list.
1270 MediaWiki can also detect
and support eAccelerator
, Turck MMCache
, APC
, and XCache
, but
1271 these should not be used
if the wiki will be running on multiple application servers
.
1273 DBA (Berkeley
-style DB
) is generally slower than using no cache at all
, and is only
1274 recommended
for testing
.
1278 <h2
>E
-mail
, e
-mail notification
and authentication setup
</h2
>
1280 <div
class="config-section">
1281 <div
class="config-input">
1282 <label
class='column'>E
-mail
features (global):</label
>
1284 <li
><?php
aField( $conf, "Email", "Enabled", "radio", "email_enabled" ); ?
></li
>
1285 <li
><?php
aField( $conf, "Email", "Disabled", "radio", "email_disabled" ); ?
></li
>
1288 <p
class="config-desc">
1289 Use this to disable all e
-mail
functions (password reminders
, user
-to
-user e
-mail
, and e
-mail notifications
)
1290 if sending mail doesn
't work on your server.
1293 <div class="config-input">
1294 <label class='column
'>User-to-user e-mail:</label>
1296 <li><?php aField( $conf, "Emailuser", "Enabled", "radio", "emailuser_enabled" ); ?></li>
1297 <li><?php aField( $conf, "Emailuser", "Disabled", "radio", "emailuser_disabled" ); ?></li>
1300 <p class="config-desc">
1301 The user-to-user e-mail feature (Special:Emailuser) lets the wiki act as a relay to allow users to exchange e-mail without publicly advertising their e-mail address.
1303 <div class="config-input">
1304 <label class='column
'>E-mail notification about changes:</label>
1306 <li><?php aField( $conf, "Enotif", "Disabled", "radio", "enotif_disabled" ); ?></li>
1307 <li><?php aField( $conf, "Enotif", "Enabled for changes to user discussion pages only", "radio", "enotif_usertalk" ); ?></li>
1308 <li><?php aField( $conf, "Enotif", "Enabled for changes to user discussion pages, and to pages on watchlists (not recommended for large wikis)", "radio", "enotif_allpages" ); ?></li>
1311 <div class="config-desc">
1313 For this feature to work, an e-mail address must be present for the user account, and the notification
1314 options in the user's preferences must be enabled
. Also note the
1315 authentication option below
. When testing the feature
, keep in mind that your own changes will never trigger notifications to be sent to yourself
.</p
>
1317 <p
>There are additional options
for fine tuning in
/includes
/DefaultSettings
.php
; copy these to your LocalSettings
.php
and edit them there to change them
.</p
>
1320 <div
class="config-input">
1321 <label
class='column'>E
-mail address authentication
:</label
>
1323 <li
><?php
aField( $conf, "Eauthent", "Disabled", "radio", "eauthent_disabled" ); ?
></li
>
1324 <li
><?php
aField( $conf, "Eauthent", "Enabled", "radio", "eauthent_enabled" ); ?
></li
>
1327 <div
class="config-desc">
1328 <p
>If this option is enabled
, users have to confirm their e
-mail address using a magic link sent to them whenever they set
or change it
, and only authenticated e
-mail addresses can receive mails from other users
and/or
1329 change notification mails
. Setting this option is
<b
>recommended
</b
> for public wikis because of potential abuse of the e
-mail features above
.</p
>
1334 <h2
>Database config
</h2
>
1336 <div
class="config-section">
1337 <div
class="config-input">
1338 <label
class='column'>Database type
:</label
>
1339 <?php
if (isset($errs['DBpicktype'])) print "\t<span class='error'>$errs[DBpicktype]</span>\n"; ?
>
1340 <ul
class='plain'><?php
1341 database_picker($conf);
1345 <div
class="config-input" style
="clear:left">
1346 <?php
aField( $conf, "DBserver", "Database host:" ); ?
>
1348 <p
class="config-desc">
1349 If your database server isn
't on your web server, enter the name or IP address here.
1352 <div class="config-input"><?php aField( $conf, "DBname", "Database name:" ); ?></div>
1353 <div class="config-input"><?php aField( $conf, "DBuser", "DB username:" ); ?></div>
1354 <div class="config-input"><?php aField( $conf, "DBpassword", "DB password:", "password" ); ?></div>
1355 <div class="config-input"><?php aField( $conf, "DBpassword2", "DB password confirm:", "password" ); ?></div>
1356 <p class="config-desc">
1357 If you only have a single user account and database available,
1358 enter those here. If you have database root access (see below)
1359 you can specify new accounts/databases to be created. This account
1360 will not be created if it pre-exists. If this is the case, ensure that it
1361 has SELECT, INSERT, UPDATE, and DELETE permissions on the MediaWiki database.
1364 <div class="config-input">
1365 <label class="column">Superuser account:</label>
1366 <input type="checkbox" name="useroot" id="useroot" <?php if( $useRoot ) { ?>checked="checked" <?php } ?> />
1367 <label for="useroot">Use superuser account</label>
1369 <div class="config-input"><?php aField( $conf, "RootUser", "Superuser name:", "text" ); ?></div>
1370 <div class="config-input"><?php aField( $conf, "RootPW", "Superuser password:", "password" ); ?></div>
1372 <p class="config-desc">
1373 If the database user specified above does not exist, or does not have access to create
1374 the database (if needed) or tables within it, please check the box and provide details
1375 of a superuser account, such as <strong>root</strong>, which does.
1378 <?php database_switcher('mysql
'); ?>
1379 <div class="config-input"><?php aField( $conf, "DBprefix", "Database table prefix:" ); ?></div>
1380 <div class="config-desc">
1381 <p>If you need to share one database between multiple wikis, or
1382 between MediaWiki and another web application, you may choose to
1383 add a prefix to all the table names to avoid conflicts.</p>
1385 <p>Avoid exotic characters; something like <tt>mw_</tt> is good.</p>
1388 <div class="config-input"><label class="column">Storage Engine</label>
1389 <div>Select one:</div>
1391 <li><?php aField( $conf, "DBengine", "InnoDB", "radio", "InnoDB" ); ?></li>
1392 <li><?php aField( $conf, "DBengine", "MyISAM", "radio", "MyISAM" ); ?></li>
1395 <p class="config-desc">
1396 InnoDB is best for public web installations, since it has good concurrency
1397 support. MyISAM may be faster in single-user installations. MyISAM databases
1398 tend to get corrupted more often than InnoDB databases.
1400 <div class="config-input"><label class="column">Database character set</label>
1401 <div>Select one:</div>
1403 <li><?php aField( $conf, "DBschema", "MySQL 4.1/5.0 binary", "radio", "mysql5-binary" ); ?></li>
1404 <li><?php aField( $conf, "DBschema", "MySQL 4.1/5.0 UTF-8", "radio", "mysql5" ); ?></li>
1405 <li><?php aField( $conf, "DBschema", "MySQL 4.0 backwards-compatible UTF-8", "radio", "mysql4" ); ?></li>
1408 <p class="config-desc">
1409 This option is ignored on upgrade, the same character set will be kept.
1411 <b>WARNING:</b> If you use <b>backwards-compatible UTF-8</b> on MySQL 4.1+, and subsequently back up the database with <tt>mysqldump</tt>, it may destroy all non-ASCII characters, irreversibly corrupting your backups!.
1413 In <b>binary mode</b>, MediaWiki stores UTF-8 text to the database in binary fields. This is more efficient than MySQL's UTF
-8 mode
, and allows you to
use the full range of Unicode characters
. In
<b
>UTF
-8 mode
</b
>, MySQL will know what character set your data is in
, and can present
and convert it appropriately
, but it won
't let you store characters above the <a target="_blank" href="http://en.wikipedia.org/wiki/Mapping_of_Unicode_character_planes">Basic Multilingual Plane</a>.
1417 <?php database_switcher('postgres
'); ?>
1418 <div class="config-input"><?php aField( $conf, "DBport", "Database port:" ); ?></div>
1419 <div class="config-input"><?php aField( $conf, "DBmwschema", "Schema for mediawiki:" ); ?></div>
1420 <div class="config-input"><?php aField( $conf, "DBts2schema", "Schema for tsearch2:" ); ?></div>
1421 <div class="config-desc">
1422 <p>The username specified above (at "DB username") will have its search path set to the above schemas,
1423 so it is recommended that you create a new user. The above schemas are generally correct:
1424 only change them if you are sure you need to.</p>
1428 <?php database_switcher('sqlite
'); ?>
1429 <div class="config-desc">
1430 <b>NOTE:</b> SQLite only uses the <i>Database name</i> setting above, the user, password and root settings are ignored.
1432 <div class="config-input"><?php
1433 aField( $conf, "SQLiteDataDir", "SQLite data directory:" );
1435 <div class="config-desc">
1436 <p>SQLite stores table data into files in the filesystem.
1437 If you do not provide an explicit path, a "data" directory in
1438 the parent of your document root will be used.</p>
1440 <p>This directory must exist and be writable by the web server.</p>
1444 <?php database_switcher('mssql
'); ?>
1445 <div class="config-input"><?php
1446 aField( $conf, "DBprefix2", "Database table prefix:" );
1448 <div class="config-desc">
1449 <p>If you need to share one database between multiple wikis, or
1450 between MediaWiki and another web application, you may choose to
1451 add a prefix to all the table names to avoid conflicts.</p>
1453 <p>Avoid exotic characters; something like <tt>mw_</tt> is good.</p>
1457 <div class="config-input" style="padding:2em 0 3em">
1458 <label class='column
'> </label>
1459 <input type="submit" value="Install MediaWiki!" class="btn-install" />
1463 <script type="text/javascript">
1464 window.onload = toggleDBarea('<?php
echo $conf->DBtype
; ?
>',
1466 ## If they passed in a root user name, don't populate it on page load
1467 echo strlen(importPost('RootUser', '')) ?
0 : 1;
1473 /* -------------------------------------------------------------------------------------- */
1474 function writeSuccessMessage() {
1475 $script = defined('MW_INSTALL_PHP5_EXT') ?
'index.php5' : 'index.php';
1476 if ( wfIniGetBool( 'safe_mode' ) && !ini_get( 'open_basedir' ) ) {
1478 <div class="success-box">
1479 <p>Installation successful!</p>
1480 <p>To complete the installation, please do the following:
1482 <li>Download config/LocalSettings.php with your FTP client or file manager</li>
1483 <li>Upload it to the parent directory</li>
1484 <li>Delete config/LocalSettings.php</li>
1485 <li>Start using <a href='../$script'>your wiki</a>!
1487 <p>If you are in a shared hosting environment, do <strong>not</strong> just move LocalSettings.php
1488 remotely. LocalSettings.php is currently owned by the user your webserver is running under,
1489 which means that anyone on the same server can read your database password! Downloading
1490 it and uploading it again will hopefully change the ownership to a user ID specific to you.</p>
1495 <div class="success-box">
1497 <span class="success-message">Installation successful!</span>
1498 Move the <tt>config/LocalSettings.php</tt> file to the parent directory, then follow
1499 <a href="../$script"> this link</a> to your wiki.</p>
1500 <p>You should change file permissions for <tt>LocalSettings.php</tt> as required to
1501 prevent other users on the server reading passwords and altering configuration data.</p>
1508 function escapePhpString( $string ) {
1509 if ( is_array( $string ) ||
is_object( $string ) ) {
1512 return strtr( $string,
1523 function writeLocalSettings( $conf ) {
1524 $conf->PasswordSender
= $conf->EmergencyContact
;
1525 $magic = ($conf->ImageMagick ?
"" : "# ");
1526 $convert = ($conf->ImageMagick ?
$conf->ImageMagick
: "/usr/bin/convert" );
1527 $rights = ($conf->RightsUrl
) ?
"" : "# ";
1528 $hashedUploads = $conf->safeMode ?
'' : '# ';
1530 if ( $conf->ShellLocale
) {
1534 $conf->ShellLocale
= 'en_US.UTF-8';
1537 switch ( $conf->Shm
) {
1539 $cacheType = 'CACHE_MEMCACHED';
1540 $mcservers = var_export( $conf->MCServerArray
, true );
1546 $cacheType = 'CACHE_ACCEL';
1547 $mcservers = 'array()';
1550 $cacheType = 'CACHE_DBA';
1551 $mcservers = 'array()';
1554 $cacheType = 'CACHE_NONE';
1555 $mcservers = 'array()';
1558 if ( $conf->Email
== 'email_enabled' ) {
1559 $enableemail = 'true';
1560 $enableuseremail = ( $conf->Emailuser
== 'emailuser_enabled' ) ?
'true' : 'false' ;
1561 $eauthent = ( $conf->Eauthent
== 'eauthent_enabled' ) ?
'true' : 'false' ;
1562 switch ( $conf->Enotif
) {
1563 case 'enotif_usertalk':
1564 $enotifusertalk = 'true';
1565 $enotifwatchlist = 'false';
1567 case 'enotif_allpages':
1568 $enotifusertalk = 'true';
1569 $enotifwatchlist = 'true';
1572 $enotifusertalk = 'false';
1573 $enotifwatchlist = 'false';
1576 $enableuseremail = 'false';
1577 $enableemail = 'false';
1578 $eauthent = 'false';
1579 $enotifusertalk = 'false';
1580 $enotifwatchlist = 'false';
1583 $file = @fopen
( "/dev/urandom", "r" );
1585 $secretKey = bin2hex( fread( $file, 32 ) );
1589 for ( $i=0; $i<8; $i++
) {
1590 $secretKey .= dechex(mt_rand(0, 0x7fffffff));
1592 print "<li>Warning: \$wgSecretKey key is insecure, generated with mt_rand(). Consider changing it manually.</li>\n";
1595 # Add slashes to strings for double quoting
1596 $slconf = array_map( "escapePhpString", get_object_vars( $conf ) );
1597 if( $conf->License
== 'gfdl' ||
$conf->License
== 'pd' ) {
1598 # Needs literal string interpolation for the current style path
1599 $slconf['RightsIcon'] = $conf->RightsIcon
;
1602 if( $conf->DBtype
== 'mysql' ) {
1604 "# MySQL specific settings
1605 \$wgDBprefix = \"{$slconf['DBprefix']}\";
1607 # MySQL table options to use during installation or update
1608 \$wgDBTableOptions = \"{$slconf['DBTableOptions']}\";
1610 # Experimental charset support for MySQL 4.1/5.0.
1611 \$wgDBmysql5 = {$conf->DBmysql5};";
1612 } elseif( $conf->DBtype
== 'postgres' ) {
1614 "# Postgres specific settings
1615 \$wgDBport = \"{$slconf['DBport']}\";
1616 \$wgDBmwschema = \"{$slconf['DBmwschema']}\";
1617 \$wgDBts2schema = \"{$slconf['DBts2schema']}\";";
1618 } elseif( $conf->DBtype
== 'sqlite' ) {
1620 "# SQLite-specific settings
1621 \$wgSQLiteDataDir = \"{$slconf['SQLiteDataDir']}\";";
1622 } elseif( $conf->DBtype
== 'mssql' ) {
1624 "# MSSQL specific settings
1625 \$wgDBprefix = \"{$slconf['DBprefix2']}\";";
1633 # This file was automatically generated by the MediaWiki installer.
1634 # If you make manual changes, please keep track in case you need to
1635 # recreate them later.
1637 # See includes/DefaultSettings.php for all configurable settings
1638 # and their default values, but don't forget to make changes in _this_
1641 # Further documentation for configuration settings may be found at:
1642 # http://www.mediawiki.org/wiki/Manual:Configuration_settings
1644 # If you customize your file layout, set \$IP to the directory that contains
1645 # the other MediaWiki files. It will be used as a base to locate files.
1646 if( defined( 'MW_INSTALL_PATH' ) ) {
1647 \$IP = MW_INSTALL_PATH;
1649 \$IP = dirname( __FILE__ );
1652 \$path = array( \$IP, \"\$IP/includes\", \"\$IP/languages\" );
1653 set_include_path( implode( PATH_SEPARATOR, \$path ) . PATH_SEPARATOR . get_include_path() );
1655 require_once( \"\$IP/includes/DefaultSettings.php\" );
1657 # If PHP's memory limit is very low, some operations may fail.
1658 " . ($conf->raiseMemory ?
'' : '# ' ) . "ini_set( 'memory_limit', '20M' );" . "
1660 if ( \$wgCommandLineMode ) {
1661 if ( isset( \$_SERVER ) && array_key_exists( 'REQUEST_METHOD', \$_SERVER ) ) {
1662 die( \"This script must be run from the command line\\n\" );
1665 ## Uncomment this to disable output compression
1666 # \$wgDisableOutputCompression = true;
1668 \$wgSitename = \"{$slconf['Sitename']}\";
1670 ## The URL base path to the directory containing the wiki;
1671 ## defaults for all runtime URL paths are based off of this.
1672 ## For more information on customizing the URLs please see:
1673 ## http://www.mediawiki.org/wiki/Manual:Short_URL
1674 \$wgScriptPath = \"{$slconf['ScriptPath']}\";
1675 \$wgScriptExtension = \"{$slconf['ScriptExtension']}\";
1677 ## UPO means: this is also a user preference option
1679 \$wgEnableEmail = $enableemail;
1680 \$wgEnableUserEmail = $enableuseremail; # UPO
1682 \$wgEmergencyContact = \"{$slconf['EmergencyContact']}\";
1683 \$wgPasswordSender = \"{$slconf['PasswordSender']}\";
1685 \$wgEnotifUserTalk = $enotifusertalk; # UPO
1686 \$wgEnotifWatchlist = $enotifwatchlist; # UPO
1687 \$wgEmailAuthentication = $eauthent;
1689 ## Database settings
1690 \$wgDBtype = \"{$slconf['DBtype']}\";
1691 \$wgDBserver = \"{$slconf['DBserver']}\";
1692 \$wgDBname = \"{$slconf['DBname']}\";
1693 \$wgDBuser = \"{$slconf['DBuser']}\";
1694 \$wgDBpassword = \"{$slconf['DBpassword']}\";
1698 ## Shared memory settings
1699 \$wgMainCacheType = $cacheType;
1700 \$wgMemCachedServers = $mcservers;
1702 ## To enable image uploads, make sure the 'images' directory
1703 ## is writable, then set this to true:
1704 \$wgEnableUploads = false;
1705 {$magic}\$wgUseImageMagick = true;
1706 {$magic}\$wgImageMagickConvertCommand = \"{$convert}\";
1708 ## If you use ImageMagick (or any other shell command) on a
1709 ## Linux server, this will need to be set to the name of an
1710 ## available UTF-8 locale
1711 {$locale}\$wgShellLocale = \"{$slconf['ShellLocale']}\";
1713 ## If you want to use image uploads under safe mode,
1714 ## create the directories images/archive, images/thumb and
1715 ## images/temp, and make them all writable. Then uncomment
1716 ## this, if it's not already uncommented:
1717 {$hashedUploads}\$wgHashedUploadDirectory = false;
1719 ## If you have the appropriate support software installed
1720 ## you can enable inline LaTeX equations:
1723 \$wgLocalInterwiki = strtolower( \$wgSitename );
1725 \$wgLanguageCode = \"{$slconf['LanguageCode']}\";
1727 \$wgSecretKey = \"$secretKey\";
1729 ## Default skin: you can change the default skin. Use the internal symbolic
1730 ## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook':
1731 \$wgDefaultSkin = 'monobook';
1733 ## For attaching licensing metadata to pages, and displaying an
1734 ## appropriate copyright notice / icon. GNU Free Documentation
1735 ## License and Creative Commons licenses are supported so far.
1736 {$rights}\$wgEnableCreativeCommonsRdf = true;
1737 \$wgRightsPage = \"\"; # Set to the title of a wiki page that describes your license/copyright
1738 \$wgRightsUrl = \"{$slconf['RightsUrl']}\";
1739 \$wgRightsText = \"{$slconf['RightsText']}\";
1740 \$wgRightsIcon = \"{$slconf['RightsIcon']}\";
1741 # \$wgRightsCode = \"{$slconf['RightsCode']}\"; # Not yet used
1743 \$wgDiff3 = \"{$slconf['diff3']}\";
1745 # When you make changes to this configuration file, this will make
1746 # sure that cached pages are cleared.
1747 \$wgCacheEpoch = max( \$wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) );
1748 "; ## End of setting the $localsettings string
1750 // Keep things in Unix line endings internally;
1751 // the system will write out as local text type.
1752 return str_replace( "\r\n", "\n", $localsettings );
1755 function dieout( $text ) {
1756 global $mainListOpened;
1757 if( $mainListOpened ) echo( "</ul>" );
1758 if( $text != '' && substr( $text, 0, 2 ) != '<p' && substr( $text, 0, 2 ) != '<h' ){
1759 echo "<p>$text</p>\n";
1763 die( "\n\n</div>\n</div>\n</div>\n</div>\n</body>\n</html>" );
1766 function importVar( &$var, $name, $default = "" ) {
1767 if( isset( $var[$name] ) ) {
1768 $retval = $var[$name];
1769 if ( get_magic_quotes_gpc() ) {
1770 $retval = stripslashes( $retval );
1778 function importPost( $name, $default = "" ) {
1779 return importVar( $_POST, $name, $default );
1782 function importCheck( $name ) {
1783 return isset( $_POST[$name] );
1786 function importRequest( $name, $default = "" ) {
1787 return importVar( $_REQUEST, $name, $default );
1792 function aField( &$conf, $field, $text, $type = "text", $value = "", $onclick = '' ) {
1795 $xtype = "type=\"$type\"";
1801 $nolabel = ($type == "radio") ||
($type == "hidden");
1803 if ($type == 'radio')
1804 $id .= $radioCount++
;
1807 echo "<label class='column' for=\"$id\">$text</label>";
1810 if( $type == "radio" && $value == $conf->$field ) {
1811 $checked = "checked='checked'";
1815 echo "<input $xtype name=\"$field\" id=\"$id\" class=\"iput-$type\" $checked ";
1817 echo " onclick='toggleDBarea(\"$value\",1)' " ;
1820 if( $type == "radio" ) {
1821 echo htmlspecialchars( $value );
1823 echo htmlspecialchars( $conf->$field );
1829 echo "<label for=\"$id\">$text</label>";
1833 if(isset($errs[$field])) echo "<span class='error'>" . $errs[$field] . "</span>\n";
1836 function getLanguageList() {
1837 global $wgLanguageNames, $IP;
1838 if( !isset( $wgLanguageNames ) ) {
1839 require_once( "$IP/languages/Names.php" );
1844 $d = opendir( "../languages/messages" );
1845 /* In case we are called from the root directory */
1847 $d = opendir( "languages/messages");
1848 while( false !== ($f = readdir( $d ) ) ) {
1850 if( preg_match( '/Messages([A-Z][a-z_]+)\.php$/', $f, $m ) ) {
1851 $code = str_replace( '_', '-', strtolower( $m[1] ) );
1852 if( isset( $wgLanguageNames[$code] ) ) {
1853 $name = $code . ' - ' . $wgLanguageNames[$code];
1857 $codes[$code] = $name;
1865 #Check for location of an executable
1866 # @param string $loc single location to check
1867 # @param array $names filenames to check for.
1868 # @param mixed $versioninfo array of details to use when checking version, use false for no version checking
1869 function locate_executable($loc, $names, $versioninfo = false) {
1870 if (!is_array($names))
1871 $names = array($names);
1873 foreach ($names as $name) {
1874 $command = "$loc".DIRECTORY_SEPARATOR
."$name";
1875 if (@file_exists
($command)) {
1879 $file = str_replace('$1', $command, $versioninfo[0]);
1880 if (strstr(`
$file`
, $versioninfo[1]) !== false)
1887 # Test a memcached server
1888 function testMemcachedServer( $server ) {
1889 $hostport = explode(":", $server);
1892 if ( !function_exists( 'fsockopen' ) ) {
1893 $errstr = "Can't connect to memcached, fsockopen() not present";
1895 if ( !$errstr && count( $hostport ) != 2 ) {
1896 $errstr = 'Please specify host and port';
1899 list( $host, $port ) = $hostport;
1903 $fp = @fsockopen
( $host, $port, $errno, $fsockerr, 1.0 );
1904 if ( $fp === false ) {
1905 $errstr = "Cannot connect to memcached on $host:$port : $fsockerr";
1909 $command = "version\r\n";
1910 $bytes = fwrite( $fp, $command );
1911 if ( $bytes != strlen( $command ) ) {
1912 $errstr = "Cannot write to memcached socket on $host:$port";
1916 $expected = "VERSION ";
1917 $response = fread( $fp, strlen( $expected ) );
1918 if ( $response != $expected ) {
1919 $errstr = "Didn't get correct memcached response from $host:$port";
1926 echo "<li>Connected to memcached on $host:$port successfully";
1931 function database_picker($conf) {
1934 foreach(array_keys($ourdb) as $db) {
1935 if ($ourdb[$db]['havedriver']) {
1937 aField( $conf, "DBtype", $ourdb[$db]['fullname'], 'radio', $db, 'onclick');
1944 function database_switcher($db) {
1946 $color = $ourdb[$db]['bgcolor'];
1947 $full = $ourdb[$db]['fullname'];
1948 print "<fieldset id='$db'><legend>$full specific options</legend>\n";
1951 function printListItem( $item ) {
1952 print "<li>$item</li>";
1955 # Determine a suitable value for $wgShellLocale
1956 function getShellLocale( $wikiLang ) {
1957 # Give up now if we're in safe mode or open_basedir
1958 # It's theoretically possible but tricky to work with
1959 if ( wfIniGetBool( "safe_mode" ) ||
ini_get( 'open_basedir' ) ) {
1963 $os = php_uname( 's' );
1964 $supported = array( 'Linux', 'SunOS', 'HP-UX' ); # Tested these
1965 if ( !in_array( $os, $supported ) ) {
1969 # Get a list of available locales
1970 $lines = $ret = false;
1971 exec( '/usr/bin/locale -a', $lines, $ret );
1976 $lines = array_map( 'trim', $lines );
1977 $candidatesByLocale = array();
1978 $candidatesByLang = array();
1979 foreach ( $lines as $line ) {
1980 if ( $line === '' ) {
1983 if ( !preg_match( '/^([a-zA-Z]+)(_[a-zA-Z]+|)\.(utf8|UTF-8)(@[a-zA-Z_]*|)$/i', $line, $m ) ) {
1986 list( $all, $lang, $territory, $charset, $modifier ) = $m;
1987 $candidatesByLocale[$m[0]] = $m;
1988 $candidatesByLang[$lang][] = $m;
1991 # Try the current value of LANG
1992 if ( isset( $candidatesByLocale[ getenv( 'LANG' ) ] ) ) {
1993 return getenv( 'LANG' );
1996 # Try the most common ones
1997 $commonLocales = array( 'en_US.UTF-8', 'en_US.utf8', 'de_DE.UTF-8', 'de_DE.utf8' );
1998 foreach ( $commonLocales as $commonLocale ) {
1999 if ( isset( $candidatesByLocale[$commonLocale] ) ) {
2000 return $commonLocale;
2004 # Is there an available locale in the Wiki's language?
2005 if ( isset( $candidatesByLang[$wikiLang] ) ) {
2006 $m = reset( $candidatesByLang[$wikiLang] );
2010 # Are there any at all?
2011 if ( count( $candidatesByLocale ) ) {
2012 $m = reset( $candidatesByLocale );
2022 <div
class="license">
2024 <p
>This program is free software
; you can redistribute it
and/or modify
2025 it under the terms of the GNU General
Public License
as published by
2026 the Free Software Foundation
; either version
2 of the License
, or
2027 (at your option
) any later version
.</p
>
2029 <p
>This program is distributed in the hope that it will be useful
,
2030 but WITHOUT ANY WARRANTY
; without even the implied warranty of
2031 MERCHANTABILITY
or FITNESS
FOR A PARTICULAR PURPOSE
. See the
2032 GNU General
Public License
for more details
.</p
>
2034 <p
>You should have received
<a href
="../COPYING">a copy of the GNU General
Public License
</a
>
2035 along with this program
; if not
, write to the Free Software
2036 Foundation
, Inc
., 51 Franklin Street
, Fifth Floor
, Boston
, MA
02110-1301, USA
.
2037 or <a href
="http://www.gnu.org/copyleft/gpl.html">read it online
</a
></p
>
2043 <div id
="column-one">
2044 <div
class="portlet" id
="p-logo">
2045 <a style
="background-image: url(../skins/common/images/mediawiki.png);"
2046 href
="http://www.mediawiki.org/"
2047 title
="Main Page"></a
>
2049 <script type
="text/javascript"> if (window
.isMSIE55
) fixalpha(); </script
>
2050 <div
class='portlet'><div
class='pBody'>
2052 <li
><strong
><a href
="http://www.mediawiki.org/">MediaWiki home
</a
></strong
></li
>
2053 <li
><a href
="../README">Readme
</a
></li
>
2054 <li
><a href
="../RELEASE-NOTES">Release notes
</a
></li
>
2055 <li
><a href
="../docs/">Documentation
</a
></li
>
2056 <li
><a href
="http://www.mediawiki.org/wiki/Help:Contents">User
's Guide</a></li>
2057 <li><a href="http://www.mediawiki.org/wiki/Manual:Contents">Administrator's Guide
</a
></li
>
2058 <li
><a href
="http://www.mediawiki.org/wiki/Manual:FAQ">FAQ
</a
></li
>
2060 <p style
="font-size:90%;margin-top:1em">MediaWiki is Copyright ©
2001-2008 by Magnus Manske
, Brion Vibber
,
2061 Lee Daniel Crocker
, Tim Starling
, Erik Möller
, Gabriel Wicke
, Æ
var Arnfjörð Bjarmason
, Niklas Laxström
,
2062 Domas Mituzas
, Rob Church
, Yuri Astrakhan
, Aryeh Gregor
, Aaron Schulz
and others
.</p
>