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
= "";
695 $conf->RightsUrl
= importRequest( "RightsUrl", "" );
696 $conf->RightsText
= importRequest( "RightsText", "" );
697 $conf->RightsCode
= importRequest( "RightsCode", "" );
698 $conf->RightsIcon
= importRequest( "RightsIcon", "" );
701 $conf->Shm
= importRequest( "Shm", "none" );
702 $conf->MCServers
= importRequest( "MCServers" );
704 /* Test memcached servers */
706 if ( $conf->Shm
== 'memcached' && $conf->MCServers
) {
707 $conf->MCServerArray
= array_map( 'trim', explode( ',', $conf->MCServers
) );
708 foreach ( $conf->MCServerArray
as $server ) {
709 $error = testMemcachedServer( $server );
711 $errs["MCServers"] = $error;
715 } else if ( $conf->Shm
== 'memcached' ) {
716 $errs["MCServers"] = "Please specify at least one server if you wish to use memcached";
719 /* default values for installation */
720 $conf->Email
= importRequest("Email", "email_enabled");
721 $conf->Emailuser
= importRequest("Emailuser", "emailuser_enabled");
722 $conf->Enotif
= importRequest("Enotif", "enotif_allpages");
723 $conf->Eauthent
= importRequest("Eauthent", "eauthent_enabled");
725 if( $conf->posted
&& ( 0 == count( $errs ) ) ) {
726 do { /* So we can 'continue' to end prematurely */
727 $conf->Root
= ($conf->RootPW
!= "");
729 /* Load up the settings and get installin' */
730 $local = writeLocalSettings( $conf );
731 echo "<li style=\"list-style: none\">\n";
732 echo "<p><b>Generating configuration file...</b></p>\n";
735 $wgCommandLineMode = false;
737 $ok = eval( $local );
738 if( $ok === false ) {
739 dieout( "<p>Errors in generated configuration; " .
740 "most likely due to a bug in the installer... " .
741 "Config file was: </p>" .
743 htmlspecialchars( $local ) .
746 $conf->DBtypename
= '';
747 foreach (array_keys($ourdb) as $db) {
748 if ($conf->DBtype
=== $db)
749 $conf->DBtypename
= $ourdb[$db]['fullname'];
751 if ( ! strlen($conf->DBtype
)) {
752 $errs["DBpicktype"] = "Please choose a database type";
756 if (! $conf->DBtypename
) {
757 $errs["DBtype"] = "Unknown database type '$conf->DBtype'";
760 print "<li>Database type: {$conf->DBtypename}</li>\n";
761 $dbclass = 'Database'.ucfirst($conf->DBtype
);
762 $wgDBtype = $conf->DBtype
;
763 $wgDBadminuser = "root";
764 $wgDBadminpassword = $conf->RootPW
;
767 $wgDBprefix = $conf->DBprefix
;
769 ## Postgres specific:
770 $wgDBport = $conf->DBport
;
771 $wgDBmwschema = $conf->DBmwschema
;
772 $wgDBts2schema = $conf->DBts2schema
;
774 if( $conf->DBprefix2
!= '' ) {
776 $wgDBprefix = $conf->DBprefix2
;
779 $wgCommandLineMode = true;
780 if (! defined ( 'STDERR' ) )
781 define( 'STDERR', fopen("php://stderr", "wb"));
782 $wgUseDatabaseMessages = false; /* FIXME: For database failure */
783 require_once( "$IP/includes/Setup.php" );
786 $wgTitle = Title
::newFromText( "Installation script" );
787 error_reporting( E_ALL
);
788 print "<li>Loading class: $dbclass</li>\n";
791 if( $conf->DBtype
== 'mysql' ) {
792 $mysqlOldClient = version_compare( mysql_get_client_info(), "4.1.0", "lt" );
793 if( $mysqlOldClient ) {
794 print "<li><b>PHP is linked with old MySQL client libraries. If you are
795 using a MySQL 4.1 server and have problems connecting to the database,
796 see <a href='http://dev.mysql.com/doc/mysql/en/old-client.html'
797 >http://dev.mysql.com/doc/mysql/en/old-client.html</a> for help.</b></li>\n";
799 $ok = true; # Let's be optimistic
801 # Decide if we're going to use the superuser or the regular database user
802 $conf->Root
= $useRoot;
804 $db_user = $conf->RootUser
;
805 $db_pass = $conf->RootPW
;
807 $db_user = $wgDBuser;
808 $db_pass = $wgDBpassword;
812 echo( "<li>Attempting to connect to database server as $db_user..." );
813 $wgDatabase = Database
::newFromParams( $wgDBserver, $db_user, $db_pass, '', 1 );
815 # Check the connection and respond to errors
816 if( $wgDatabase->isOpen() ) {
819 $wgDBadminuser = $db_user;
820 $wgDBadminpassword = $db_pass;
821 echo( "success.</li>\n" );
822 $wgDatabase->ignoreErrors( true );
823 $myver = $wgDatabase->getServerVersion();
825 # There were errors, report them and back out
827 $errno = mysql_errno();
828 $errtx = htmlspecialchars( mysql_error() );
832 echo( "failed due to authentication errors. Check passwords.</li>" );
834 # The superuser details are wrong
835 $errs["RootUser"] = "Check username";
836 $errs["RootPW"] = "and password";
838 # The regular user details are wrong
839 $errs["DBuser"] = "Check username";
840 $errs["DBpassword"] = "and password";
846 # General connection problem
847 echo( "failed with error [$errno] $errtx.</li>\n" );
848 $errs["DBserver"] = "Connection failed";
853 if( !$ok ) { continue; }
856 error_reporting( E_ALL
);
858 ## Possible connect as a superuser
859 if( $useRoot && $conf->DBtype
!= 'sqlite' ) {
860 $wgDBsuperuser = $conf->RootUser
;
861 echo( "<li>Attempting to connect to database \"postgres\" as superuser \"$wgDBsuperuser\"..." );
862 $wgDatabase = $dbc->newFromParams($wgDBserver, $wgDBsuperuser, $conf->RootPW
, "postgres", 1);
863 if (!$wgDatabase->isOpen()) {
864 print " error: " . $wgDatabase->lastError() . "</li>\n";
865 $errs["DBserver"] = "Could not connect to database as superuser";
866 $errs["RootUser"] = "Check username";
867 $errs["RootPW"] = "and password";
870 $wgDatabase->initial_setup($conf->RootPW
, 'postgres');
872 echo( "<li>Attempting to connect to database \"$wgDBname\" as \"$wgDBuser\"..." );
873 $wgDatabase = $dbc->newFromParams($wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname, 1);
874 if (!$wgDatabase->isOpen()) {
875 print " error: " . $wgDatabase->lastError() . "</li>\n";
877 $myver = $wgDatabase->getServerVersion();
879 if (is_callable(array($wgDatabase, 'initial_setup'))) $wgDatabase->initial_setup('', $wgDBname);
882 if ( !$wgDatabase->isOpen() ) {
883 $errs["DBserver"] = "Couldn't connect to database";
887 print "<li>Connected to $myver";
888 if ($conf->DBtype
== 'mysql') {
889 if( version_compare( $myver, "4.0.14" ) < 0 ) {
891 dieout( "-- mysql 4.0.14 or later required. Aborting." );
893 $mysqlNewAuth = version_compare( $myver, "4.1.0", "ge" );
894 if( $mysqlNewAuth && $mysqlOldClient ) {
895 print "; <b class='error'>You are using MySQL 4.1 server, but PHP is linked
896 to old client libraries; if you have trouble with authentication, see
897 <a href='http://dev.mysql.com/doc/mysql/en/old-client.html'
898 >http://dev.mysql.com/doc/mysql/en/old-client.html</a> for help.</b>";
901 if( $mysqlNewAuth ) {
902 print "; enabling MySQL 4.1/5.0 charset mode";
904 print "; <b class='error'>MySQL 4.1/5.0 charset mode enabled,
905 but older version detected; will likely fail.</b>";
910 @$sel = $wgDatabase->selectDB( $wgDBname );
912 print "<li>Database <tt>" . htmlspecialchars( $wgDBname ) . "</tt> exists</li>\n";
914 $err = mysql_errno();
915 $databaseSafe = htmlspecialchars( $wgDBname );
916 if( $err == 1102 /* Invalid database name */ ) {
917 print "<ul><li><strong>{$databaseSafe}</strong> is not a valid database name.</li></ul>";
919 } elseif( $err != 1049 /* Database doesn't exist */ ) {
920 print "<ul><li>Error selecting database <strong>{$databaseSafe}</strong>: {$err} ";
921 print htmlspecialchars( mysql_error() ) . "</li></ul>";
924 print "<li>Attempting to create database...</li>";
925 $res = $wgDatabase->query( "CREATE DATABASE `$wgDBname`" );
927 print "<li>Couldn't create database <tt>" .
928 htmlspecialchars( $wgDBname ) .
929 "</tt>; try with root access or check your username/pass.</li>\n";
930 $errs["RootPW"] = "<- Enter";
933 print "<li>Created database <tt>" . htmlspecialchars( $wgDBname ) . "</tt></li>\n";
935 $wgDatabase->selectDB( $wgDBname );
937 else if ($conf->DBtype
== 'postgres') {
938 if( version_compare( $myver, "PostgreSQL 8.0" ) < 0 ) {
939 dieout( "<b>Postgres 8.0 or later is required</b>. Aborting." );
943 if( $wgDatabase->tableExists( "cur" ) ||
$wgDatabase->tableExists( "revision" ) ) {
944 print "<li>There are already MediaWiki tables in this database. Checking if updates are needed...</li>\n";
946 if ( $conf->DBtype
== 'mysql') {
947 # Determine existing default character set
948 if ( $wgDatabase->tableExists( "revision" ) ) {
949 $revision = $wgDatabase->escapeLike( $conf->DBprefix
. 'revision' );
950 $res = $wgDatabase->query( "SHOW TABLE STATUS LIKE '$revision'" );
951 $row = $wgDatabase->fetchObject( $res );
953 echo "<li>SHOW TABLE STATUS query failed!</li>\n";
954 $existingSchema = false;
955 $existingEngine = false;
957 if ( preg_match( '/^latin1/', $row->Collation
) ) {
958 $existingSchema = 'mysql4';
959 } elseif ( preg_match( '/^utf8/', $row->Collation
) ) {
960 $existingSchema = 'mysql5';
961 } elseif ( preg_match( '/^binary/', $row->Collation
) ) {
962 $existingSchema = 'mysql5-binary';
964 $existingSchema = false;
965 echo "<li><strong>Warning:</strong> Unrecognised existing collation</li>\n";
967 if ( isset( $row->Engine
) ) {
968 $existingEngine = $row->Engine
;
970 $existingEngine = $row->Type
;
973 if ( $existingSchema && $existingSchema != $conf->DBschema
) {
974 print "<li><strong>Warning:</strong> you requested the {$conf->DBschema} schema, " .
975 "but the existing database has the $existingSchema schema. This upgrade script ".
976 "can't convert it, so it will remain $existingSchema.</li>\n";
977 $conf->setSchema( $existingSchema, $conf->DBengine
);
979 if ( $existingEngine && $existingEngine != $conf->DBengine
) {
980 print "<li><strong>Warning:</strong> you requested the {$conf->DBengine} storage " .
981 "engine, but the existing database uses the $existingEngine engine. This upgrade " .
982 "script can't convert it, so it will remain $existingEngine.</li>\n";
983 $conf->setSchema( $conf->DBschema
, $existingEngine );
987 # Create user if required
989 $conn = $dbc->newFromParams( $wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname, 1 );
990 if ( $conn->isOpen() ) {
991 print "<li>DB user account ok</li>\n";
994 print "<li>Granting user permissions...";
995 if( $mysqlOldClient && $mysqlNewAuth ) {
996 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>";
999 dbsource( "../maintenance/users.sql", $wgDatabase );
1003 print "</ul><pre>\n";
1009 print "<ul><li>Finished update checks.</li>\n";
1011 # Determine available storage engines if possible
1012 if ( $conf->DBtype
== 'mysql' && version_compare( $myver, "4.1.2", "ge" ) ) {
1013 $res = $wgDatabase->query( 'SHOW ENGINES' );
1015 while ( $row = $wgDatabase->fetchObject( $res ) ) {
1016 if ( $row->Engine
== $conf->DBengine
) {
1021 $wgDatabase->freeResult( $res );
1022 if ( !$found && $conf->DBengine
!= 'MyISAM' ) {
1023 echo "<li><strong>Warning:</strong> {$conf->DBengine} storage engine not available, " .
1024 "using MyISAM instead</li>\n";
1025 $conf->setSchema( $conf->DBschema
, 'MyISAM' );
1029 # FIXME: Check for errors
1030 print "<li>Creating tables...";
1031 if ($conf->DBtype
== 'mysql') {
1032 dbsource( "../maintenance/tables.sql", $wgDatabase );
1033 dbsource( "../maintenance/interwiki.sql", $wgDatabase );
1034 } elseif (is_callable(array($wgDatabase, 'setup_database'))) {
1035 $wgDatabase->setup_database();
1038 $errs["DBtype"] = "Do not know how to handle database type '$conf->DBtype'";
1042 print " done.</li>\n";
1044 print "<li>Initializing statistics...</li>\n";
1045 $wgDatabase->insert( 'site_stats',
1046 array ( 'ss_row_id' => 1,
1047 'ss_total_views' => 0,
1048 'ss_total_edits' => 1, # Main page first edit
1049 'ss_good_articles' => 0, # Main page is not a good article - no internal link
1050 'ss_total_pages' => 1, # Main page
1051 'ss_users' => $conf->SysopName ?
1 : 0, # Sysop account, if created
1052 'ss_admins' => $conf->SysopName ?
1 : 0, # Sysop account, if created
1053 'ss_images' => 0 ) );
1055 # Set up the "regular user" account *if we can, and if we need to*
1056 if( $conf->Root
and $conf->DBtype
== 'mysql') {
1058 $wgDatabase2 = $dbc->newFromParams( $wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname, 1 );
1059 if( $wgDatabase2->isOpen() ) {
1060 # Nope, just close the test connection and continue
1061 $wgDatabase2->close();
1062 echo( "<li>User $wgDBuser exists. Skipping grants.</li>\n" );
1064 # Yes, so run the grants
1065 echo( "<li>Granting user permissions to $wgDBuser on $wgDBname..." );
1066 dbsource( "../maintenance/users.sql", $wgDatabase );
1067 echo( "success.</li>\n" );
1071 if( $conf->SysopName
) {
1072 $u = User
::newFromName( $conf->getSysopName() );
1074 print "<li><strong class=\"error\">Warning:</strong> Skipped sysop account creation - invalid username!</li>\n";
1076 else if ( 0 == $u->idForName() ) {
1077 $u->addToDatabase();
1078 $u->setPassword( $conf->getSysopPass() );
1081 $u->addGroup( "sysop" );
1082 $u->addGroup( "bureaucrat" );
1084 print "<li>Created sysop account <tt>" .
1085 htmlspecialchars( $conf->SysopName
) . "</tt>.</li>\n";
1087 print "<li>Could not create user - already exists!</li>\n";
1090 print "<li>Skipped sysop account creation, no name given.</li>\n";
1093 $titleobj = Title
::newFromText( wfMsgNoDB( "mainpage" ) );
1094 $article = new Article( $titleobj );
1095 $newid = $article->insertOn( $wgDatabase );
1096 $revision = new Revision( array(
1098 'text' => wfMsg( 'mainpagetext' ) . "\n\n" . wfMsgNoTrans( 'mainpagedocfooter' ),
1101 'user_text' => 'MediaWiki default',
1103 $revid = $revision->insertOn( $wgDatabase );
1104 $article->updateRevisionOn( $wgDatabase, $revision );
1107 /* Write out the config file now that all is well */
1108 print "<li style=\"list-style: none\">\n";
1109 print "<p>Creating LocalSettings.php...</p>\n\n";
1110 $localSettings = "<" . "?php$endl$local";
1111 // Fix up a common line-ending problem (due to CVS on Windows)
1112 $localSettings = str_replace( "\r\n", "\n", $localSettings );
1113 $f = fopen( "LocalSettings.php", 'xt' );
1117 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" .
1118 "<p>Here's the file that would have been written, try to paste it into place manually:</p>\n" .
1119 "<pre>\n" . htmlspecialchars( $localSettings ) . "</pre>\n" );
1121 if(fwrite( $f, $localSettings ) ) {
1124 writeSuccessMessage();
1128 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" );
1135 $mainListOpened = false;
1137 if( count( $errs ) ) {
1138 /* Display options form */
1140 if( $conf->posted
) {
1141 echo "<p class='error-top'>Something's not quite right yet; make sure everything below is filled out correctly.</p>\n";
1145 <form action
="<?php echo defined('MW_INSTALL_PHP5_EXT') ? 'index.php5' : 'index.php'; ?>" name
="config" method
="post">
1147 <h2
>Site config
</h2
>
1149 <div
class="config-section">
1150 <div
class="config-input">
1151 <?php
aField( $conf, "Sitename", "Wiki name:" ); ?
>
1153 <p
class="config-desc">
1154 Preferably a short word without punctuation
, i
.e
. "Wikipedia".<br
/>
1155 Will appear
as the
namespace name
for "meta" pages
, and throughout the
interface.
1157 <div
class="config-input"><?php
aField( $conf, "EmergencyContact", "Contact e-mail:" ); ?
></div
>
1158 <p
class="config-desc">
1159 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
.
1162 <div
class="config-input">
1163 <label
class='column' for="LanguageCode">Language
:</label
>
1164 <select id
="LanguageCode" name
="LanguageCode"><?php
1165 $list = getLanguageList();
1166 foreach( $list as $code => $name ) {
1167 $sel = ($code == $conf->LanguageCode
) ?
'selected="selected"' : '';
1168 echo "\n\t\t<option value=\"$code\" $sel>$name</option>";
1174 <p
class="config-desc">
1175 Select the language
for your wiki
's interface. Some localizations aren't fully complete
. Unicode (UTF
-8) is used
for all localizations
.
1178 <div
class="config-input">
1179 <label
class='column'>Copyright
/license
:</label
>
1182 <li
><?php
aField( $conf, "License", "No license metadata", "radio", "none" ); ?
></li
>
1183 <li
><?php
aField( $conf, "License", "GNU Free Documentation License 1.2 (Wikipedia-compatible)", "radio", "gfdl" ); ?
></li
>
1185 aField( $conf, "License", "A Creative Commons license - ", "radio", "cc" );
1186 $partner = "MediaWiki";
1187 $script = defined('MW_INSTALL_PHP5_EXT') ?
'index.php5' : 'index.php';
1188 $exit = urlencode( "$wgServer{$conf->ScriptPath}/config/$script?License=cc&RightsUrl=[license_url]&RightsText=[license_name]&RightsCode=[license_code]&RightsIcon=[license_button]" );
1189 $icon = urlencode( "$wgServer$wgUploadPath/wiki.png" );
1190 $ccApp = htmlspecialchars( "http://creativecommons.org/license/?partner=$partner&exit_url=$exit&partner_icon_url=$icon" );
1191 print "<a href=\"$ccApp\" target='_blank'>choose</a>";
1192 if( $conf->License
== "cc" ) { ?
>
1194 <li
><?php
aField( $conf, "RightsIcon", "<img src=\"" . htmlspecialchars( $conf->RightsIcon
) . "\" alt='(Creative Commons icon)' />", "hidden" ); ?
></li
>
1195 <li
><?php
aField( $conf, "RightsText", htmlspecialchars( $conf->RightsText
), "hidden" ); ?
></li
>
1196 <li
><?php
aField( $conf, "RightsCode", "code: " . htmlspecialchars( $conf->RightsCode
), "hidden" ); ?
></li
>
1197 <li
><?php
aField( $conf, "RightsUrl", "<a href=\"" . htmlspecialchars( $conf->RightsUrl
) . "\">" . htmlspecialchars( $conf->RightsUrl
) . "</a>", "hidden" ); ?
></li
>
1203 <p
class="config-desc">
1204 A notice
, icon
, and machine
-readable copyright metadata will be displayed
for the license you pick
.
1208 <div
class="config-input">
1209 <?php
aField( $conf, "SysopName", "Admin username:" ) ?
>
1211 <div
class="config-input">
1212 <?php
aField( $conf, "SysopPass", "Password:", "password" ) ?
>
1214 <div
class="config-input">
1215 <?php
aField( $conf, "SysopPass2", "Password confirm:", "password" ) ?
>
1217 <p
class="config-desc">
1218 An admin can lock
/delete pages
, block users from editing
, and do other maintenance tasks
.<br
/>
1219 A
new account will be added only when creating a
new wiki database
.
1221 The password cannot be the same
as the username
.
1224 <div
class="config-input">
1225 <label
class='column'>Object caching
:</label
>
1228 <li
><?php
aField( $conf, "Shm", "No caching", "radio", "none" ); ?
></li
>
1230 if ( $conf->turck
) {
1232 aField( $conf, "Shm", "Turck MMCache", "radio", "turck" );
1235 if( $conf->xcache
) {
1237 aField( $conf, 'Shm', 'XCache', 'radio', 'xcache' );
1242 aField( $conf, "Shm", "APC", "radio", "apc" );
1245 if ( $conf->eaccel
) {
1247 aField( $conf, "Shm", "eAccelerator", "radio", "eaccel" );
1252 aField( $conf, "Shm", "DBA (not recommended)", "radio", "dba" );
1256 <li
><?php
aField( $conf, "Shm", "Memcached", "radio", "memcached" ); ?
></li
>
1258 <div style
="clear:left"><?php
aField( $conf, "MCServers", "Memcached servers:", "text" ) ?
></div
>
1260 <p
class="config-desc">
1261 An
object caching system such
as memcached will provide a significant performance boost
,
1262 but needs to be installed
. Provide the server addresses
and ports in a comma
-separated
list.
1264 MediaWiki can also detect
and support eAccelerator
, Turck MMCache
, APC
, and XCache
, but
1265 these should not be used
if the wiki will be running on multiple application servers
.
1267 DBA (Berkeley
-style DB
) is generally slower than using no cache at all
, and is only
1268 recommended
for testing
.
1272 <h2
>E
-mail
, e
-mail notification
and authentication setup
</h2
>
1274 <div
class="config-section">
1275 <div
class="config-input">
1276 <label
class='column'>E
-mail
features (global):</label
>
1278 <li
><?php
aField( $conf, "Email", "Enabled", "radio", "email_enabled" ); ?
></li
>
1279 <li
><?php
aField( $conf, "Email", "Disabled", "radio", "email_disabled" ); ?
></li
>
1282 <p
class="config-desc">
1283 Use this to disable all e
-mail
functions (password reminders
, user
-to
-user e
-mail
, and e
-mail notifications
)
1284 if sending mail doesn
't work on your server.
1287 <div class="config-input">
1288 <label class='column
'>User-to-user e-mail:</label>
1290 <li><?php aField( $conf, "Emailuser", "Enabled", "radio", "emailuser_enabled" ); ?></li>
1291 <li><?php aField( $conf, "Emailuser", "Disabled", "radio", "emailuser_disabled" ); ?></li>
1294 <p class="config-desc">
1295 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.
1297 <div class="config-input">
1298 <label class='column
'>E-mail notification about changes:</label>
1300 <li><?php aField( $conf, "Enotif", "Disabled", "radio", "enotif_disabled" ); ?></li>
1301 <li><?php aField( $conf, "Enotif", "Enabled for changes to user discussion pages only", "radio", "enotif_usertalk" ); ?></li>
1302 <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>
1305 <div class="config-desc">
1307 For this feature to work, an e-mail address must be present for the user account, and the notification
1308 options in the user's preferences must be enabled
. Also note the
1309 authentication option below
. When testing the feature
, keep in mind that your own changes will never trigger notifications to be sent to yourself
.</p
>
1311 <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
>
1314 <div
class="config-input">
1315 <label
class='column'>E
-mail address authentication
:</label
>
1317 <li
><?php
aField( $conf, "Eauthent", "Disabled", "radio", "eauthent_disabled" ); ?
></li
>
1318 <li
><?php
aField( $conf, "Eauthent", "Enabled", "radio", "eauthent_enabled" ); ?
></li
>
1321 <div
class="config-desc">
1322 <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
1323 change notification mails
. Setting this option is
<b
>recommended
</b
> for public wikis because of potential abuse of the e
-mail features above
.</p
>
1328 <h2
>Database config
</h2
>
1330 <div
class="config-section">
1331 <div
class="config-input">
1332 <label
class='column'>Database type
:</label
>
1333 <?php
if (isset($errs['DBpicktype'])) print "\t<span class='error'>$errs[DBpicktype]</span>\n"; ?
>
1334 <ul
class='plain'><?php
1335 database_picker($conf);
1339 <div
class="config-input" style
="clear:left">
1340 <?php
aField( $conf, "DBserver", "Database host:" ); ?
>
1342 <p
class="config-desc">
1343 If your database server isn
't on your web server, enter the name or IP address here.
1346 <div class="config-input"><?php aField( $conf, "DBname", "Database name:" ); ?></div>
1347 <div class="config-input"><?php aField( $conf, "DBuser", "DB username:" ); ?></div>
1348 <div class="config-input"><?php aField( $conf, "DBpassword", "DB password:", "password" ); ?></div>
1349 <div class="config-input"><?php aField( $conf, "DBpassword2", "DB password confirm:", "password" ); ?></div>
1350 <p class="config-desc">
1351 If you only have a single user account and database available,
1352 enter those here. If you have database root access (see below)
1353 you can specify new accounts/databases to be created. This account
1354 will not be created if it pre-exists. If this is the case, ensure that it
1355 has SELECT, INSERT, UPDATE, and DELETE permissions on the MediaWiki database.
1358 <div class="config-input">
1359 <label class="column">Superuser account:</label>
1360 <input type="checkbox" name="useroot" id="useroot" <?php if( $useRoot ) { ?>checked="checked" <?php } ?> />
1361 <label for="useroot">Use superuser account</label>
1363 <div class="config-input"><?php aField( $conf, "RootUser", "Superuser name:", "text" ); ?></div>
1364 <div class="config-input"><?php aField( $conf, "RootPW", "Superuser password:", "password" ); ?></div>
1366 <p class="config-desc">
1367 If the database user specified above does not exist, or does not have access to create
1368 the database (if needed) or tables within it, please check the box and provide details
1369 of a superuser account, such as <strong>root</strong>, which does.
1372 <?php database_switcher('mysql
'); ?>
1373 <div class="config-input"><?php aField( $conf, "DBprefix", "Database table prefix:" ); ?></div>
1374 <div class="config-desc">
1375 <p>If you need to share one database between multiple wikis, or
1376 between MediaWiki and another web application, you may choose to
1377 add a prefix to all the table names to avoid conflicts.</p>
1379 <p>Avoid exotic characters; something like <tt>mw_</tt> is good.</p>
1382 <div class="config-input"><label class="column">Storage Engine</label>
1383 <div>Select one:</div>
1385 <li><?php aField( $conf, "DBengine", "InnoDB", "radio", "InnoDB" ); ?></li>
1386 <li><?php aField( $conf, "DBengine", "MyISAM", "radio", "MyISAM" ); ?></li>
1389 <p class="config-desc">
1390 InnoDB is best for public web installations, since it has good concurrency
1391 support. MyISAM may be faster in single-user installations. MyISAM databases
1392 tend to get corrupted more often than InnoDB databases.
1394 <div class="config-input"><label class="column">Database character set</label>
1395 <div>Select one:</div>
1397 <li><?php aField( $conf, "DBschema", "MySQL 4.1/5.0 binary", "radio", "mysql5-binary" ); ?></li>
1398 <li><?php aField( $conf, "DBschema", "MySQL 4.1/5.0 UTF-8", "radio", "mysql5" ); ?></li>
1399 <li><?php aField( $conf, "DBschema", "MySQL 4.0 backwards-compatible UTF-8", "radio", "mysql4" ); ?></li>
1402 <p class="config-desc">
1403 This option is ignored on upgrade, the same character set will be kept.
1405 <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!.
1407 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>.
1411 <?php database_switcher('postgres
'); ?>
1412 <div class="config-input"><?php aField( $conf, "DBport", "Database port:" ); ?></div>
1413 <div class="config-input"><?php aField( $conf, "DBmwschema", "Schema for mediawiki:" ); ?></div>
1414 <div class="config-input"><?php aField( $conf, "DBts2schema", "Schema for tsearch2:" ); ?></div>
1415 <div class="config-desc">
1416 <p>The username specified above (at "DB username") will have its search path set to the above schemas,
1417 so it is recommended that you create a new user. The above schemas are generally correct:
1418 only change them if you are sure you need to.</p>
1422 <?php database_switcher('sqlite
'); ?>
1423 <div class="config-desc">
1424 <b>NOTE:</b> SQLite only uses the <i>Database name</i> setting above, the user, password and root settings are ignored.
1426 <div class="config-input"><?php
1427 aField( $conf, "SQLiteDataDir", "SQLite data directory:" );
1429 <div class="config-desc">
1430 <p>SQLite stores table data into files in the filesystem.
1431 If you do not provide an explicit path, a "data" directory in
1432 the parent of your document root will be used.</p>
1434 <p>This directory must exist and be writable by the web server.</p>
1438 <?php database_switcher('mssql
'); ?>
1439 <div class="config-input"><?php
1440 aField( $conf, "DBprefix2", "Database table prefix:" );
1442 <div class="config-desc">
1443 <p>If you need to share one database between multiple wikis, or
1444 between MediaWiki and another web application, you may choose to
1445 add a prefix to all the table names to avoid conflicts.</p>
1447 <p>Avoid exotic characters; something like <tt>mw_</tt> is good.</p>
1451 <div class="config-input" style="padding:2em 0 3em">
1452 <label class='column
'> </label>
1453 <input type="submit" value="Install MediaWiki!" class="btn-install" />
1457 <script type="text/javascript">
1458 window.onload = toggleDBarea('<?php
echo $conf->DBtype
; ?
>',
1460 ## If they passed in a root user name, don't populate it on page load
1461 echo strlen(importPost('RootUser', '')) ?
0 : 1;
1467 /* -------------------------------------------------------------------------------------- */
1468 function writeSuccessMessage() {
1469 $script = defined('MW_INSTALL_PHP5_EXT') ?
'index.php5' : 'index.php';
1470 if ( wfIniGetBool( 'safe_mode' ) && !ini_get( 'open_basedir' ) ) {
1472 <div class="success-box">
1473 <p>Installation successful!</p>
1474 <p>To complete the installation, please do the following:
1476 <li>Download config/LocalSettings.php with your FTP client or file manager</li>
1477 <li>Upload it to the parent directory</li>
1478 <li>Delete config/LocalSettings.php</li>
1479 <li>Start using <a href='../$script'>your wiki</a>!
1481 <p>If you are in a shared hosting environment, do <strong>not</strong> just move LocalSettings.php
1482 remotely. LocalSettings.php is currently owned by the user your webserver is running under,
1483 which means that anyone on the same server can read your database password! Downloading
1484 it and uploading it again will hopefully change the ownership to a user ID specific to you.</p>
1489 <div class="success-box">
1491 <span class="success-message">Installation successful!</span>
1492 Move the <tt>config/LocalSettings.php</tt> file to the parent directory, then follow
1493 <a href="../$script"> this link</a> to your wiki.</p>
1494 <p>You should change file permissions for <tt>LocalSettings.php</tt> as required to
1495 prevent other users on the server reading passwords and altering configuration data.</p>
1502 function escapePhpString( $string ) {
1503 if ( is_array( $string ) ||
is_object( $string ) ) {
1506 return strtr( $string,
1517 function writeLocalSettings( $conf ) {
1518 $conf->PasswordSender
= $conf->EmergencyContact
;
1519 $magic = ($conf->ImageMagick ?
"" : "# ");
1520 $convert = ($conf->ImageMagick ?
$conf->ImageMagick
: "/usr/bin/convert" );
1521 $rights = ($conf->RightsUrl
) ?
"" : "# ";
1522 $hashedUploads = $conf->safeMode ?
'' : '# ';
1524 if ( $conf->ShellLocale
) {
1528 $conf->ShellLocale
= 'en_US.UTF-8';
1531 switch ( $conf->Shm
) {
1533 $cacheType = 'CACHE_MEMCACHED';
1534 $mcservers = var_export( $conf->MCServerArray
, true );
1540 $cacheType = 'CACHE_ACCEL';
1541 $mcservers = 'array()';
1544 $cacheType = 'CACHE_DBA';
1545 $mcservers = 'array()';
1548 $cacheType = 'CACHE_NONE';
1549 $mcservers = 'array()';
1552 if ( $conf->Email
== 'email_enabled' ) {
1553 $enableemail = 'true';
1554 $enableuseremail = ( $conf->Emailuser
== 'emailuser_enabled' ) ?
'true' : 'false' ;
1555 $eauthent = ( $conf->Eauthent
== 'eauthent_enabled' ) ?
'true' : 'false' ;
1556 switch ( $conf->Enotif
) {
1557 case 'enotif_usertalk':
1558 $enotifusertalk = 'true';
1559 $enotifwatchlist = 'false';
1561 case 'enotif_allpages':
1562 $enotifusertalk = 'true';
1563 $enotifwatchlist = 'true';
1566 $enotifusertalk = 'false';
1567 $enotifwatchlist = 'false';
1570 $enableuseremail = 'false';
1571 $enableemail = 'false';
1572 $eauthent = 'false';
1573 $enotifusertalk = 'false';
1574 $enotifwatchlist = 'false';
1577 $file = @fopen
( "/dev/urandom", "r" );
1579 $secretKey = bin2hex( fread( $file, 32 ) );
1583 for ( $i=0; $i<8; $i++
) {
1584 $secretKey .= dechex(mt_rand(0, 0x7fffffff));
1586 print "<li>Warning: \$wgSecretKey key is insecure, generated with mt_rand(). Consider changing it manually.</li>\n";
1589 # Add slashes to strings for double quoting
1590 $slconf = array_map( "escapePhpString", get_object_vars( $conf ) );
1591 if( $conf->License
== 'gfdl' ) {
1592 # Needs literal string interpolation for the current style path
1593 $slconf['RightsIcon'] = $conf->RightsIcon
;
1596 if( $conf->DBtype
== 'mysql' ) {
1598 "# MySQL specific settings
1599 \$wgDBprefix = \"{$slconf['DBprefix']}\";
1601 # MySQL table options to use during installation or update
1602 \$wgDBTableOptions = \"{$slconf['DBTableOptions']}\";
1604 # Experimental charset support for MySQL 4.1/5.0.
1605 \$wgDBmysql5 = {$conf->DBmysql5};";
1606 } elseif( $conf->DBtype
== 'postgres' ) {
1608 "# Postgres specific settings
1609 \$wgDBport = \"{$slconf['DBport']}\";
1610 \$wgDBmwschema = \"{$slconf['DBmwschema']}\";
1611 \$wgDBts2schema = \"{$slconf['DBts2schema']}\";";
1612 } elseif( $conf->DBtype
== 'sqlite' ) {
1614 "# SQLite-specific settings
1615 \$wgSQLiteDataDir = \"{$slconf['SQLiteDataDir']}\";";
1616 } elseif( $conf->DBtype
== 'mssql' ) {
1618 "# MSSQL specific settings
1619 \$wgDBprefix = \"{$slconf['DBprefix2']}\";";
1627 # This file was automatically generated by the MediaWiki installer.
1628 # If you make manual changes, please keep track in case you need to
1629 # recreate them later.
1631 # See includes/DefaultSettings.php for all configurable settings
1632 # and their default values, but don't forget to make changes in _this_
1635 # Further documentation for configuration settings may be found at:
1636 # http://www.mediawiki.org/wiki/Manual:Configuration_settings
1638 # If you customize your file layout, set \$IP to the directory that contains
1639 # the other MediaWiki files. It will be used as a base to locate files.
1640 if( defined( 'MW_INSTALL_PATH' ) ) {
1641 \$IP = MW_INSTALL_PATH;
1643 \$IP = dirname( __FILE__ );
1646 \$path = array( \$IP, \"\$IP/includes\", \"\$IP/languages\" );
1647 set_include_path( implode( PATH_SEPARATOR, \$path ) . PATH_SEPARATOR . get_include_path() );
1649 require_once( \"\$IP/includes/DefaultSettings.php\" );
1651 # If PHP's memory limit is very low, some operations may fail.
1652 " . ($conf->raiseMemory ?
'' : '# ' ) . "ini_set( 'memory_limit', '20M' );" . "
1654 if ( \$wgCommandLineMode ) {
1655 if ( isset( \$_SERVER ) && array_key_exists( 'REQUEST_METHOD', \$_SERVER ) ) {
1656 die( \"This script must be run from the command line\\n\" );
1659 ## Uncomment this to disable output compression
1660 # \$wgDisableOutputCompression = true;
1662 \$wgSitename = \"{$slconf['Sitename']}\";
1664 ## The URL base path to the directory containing the wiki;
1665 ## defaults for all runtime URL paths are based off of this.
1666 ## For more information on customizing the URLs please see:
1667 ## http://www.mediawiki.org/wiki/Manual:Short_URL
1668 \$wgScriptPath = \"{$slconf['ScriptPath']}\";
1669 \$wgScriptExtension = \"{$slconf['ScriptExtension']}\";
1671 ## UPO means: this is also a user preference option
1673 \$wgEnableEmail = $enableemail;
1674 \$wgEnableUserEmail = $enableuseremail; # UPO
1676 \$wgEmergencyContact = \"{$slconf['EmergencyContact']}\";
1677 \$wgPasswordSender = \"{$slconf['PasswordSender']}\";
1679 \$wgEnotifUserTalk = $enotifusertalk; # UPO
1680 \$wgEnotifWatchlist = $enotifwatchlist; # UPO
1681 \$wgEmailAuthentication = $eauthent;
1683 ## Database settings
1684 \$wgDBtype = \"{$slconf['DBtype']}\";
1685 \$wgDBserver = \"{$slconf['DBserver']}\";
1686 \$wgDBname = \"{$slconf['DBname']}\";
1687 \$wgDBuser = \"{$slconf['DBuser']}\";
1688 \$wgDBpassword = \"{$slconf['DBpassword']}\";
1692 ## Shared memory settings
1693 \$wgMainCacheType = $cacheType;
1694 \$wgMemCachedServers = $mcservers;
1696 ## To enable image uploads, make sure the 'images' directory
1697 ## is writable, then set this to true:
1698 \$wgEnableUploads = false;
1699 {$magic}\$wgUseImageMagick = true;
1700 {$magic}\$wgImageMagickConvertCommand = \"{$convert}\";
1702 ## If you use ImageMagick (or any other shell command) on a
1703 ## Linux server, this will need to be set to the name of an
1704 ## available UTF-8 locale
1705 {$locale}\$wgShellLocale = \"{$slconf['ShellLocale']}\";
1707 ## If you want to use image uploads under safe mode,
1708 ## create the directories images/archive, images/thumb and
1709 ## images/temp, and make them all writable. Then uncomment
1710 ## this, if it's not already uncommented:
1711 {$hashedUploads}\$wgHashedUploadDirectory = false;
1713 ## If you have the appropriate support software installed
1714 ## you can enable inline LaTeX equations:
1717 \$wgLocalInterwiki = strtolower( \$wgSitename );
1719 \$wgLanguageCode = \"{$slconf['LanguageCode']}\";
1721 \$wgSecretKey = \"$secretKey\";
1723 ## Default skin: you can change the default skin. Use the internal symbolic
1724 ## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook':
1725 \$wgDefaultSkin = 'monobook';
1727 ## For attaching licensing metadata to pages, and displaying an
1728 ## appropriate copyright notice / icon. GNU Free Documentation
1729 ## License and Creative Commons licenses are supported so far.
1730 {$rights}\$wgEnableCreativeCommonsRdf = true;
1731 \$wgRightsPage = \"\"; # Set to the title of a wiki page that describes your license/copyright
1732 \$wgRightsUrl = \"{$slconf['RightsUrl']}\";
1733 \$wgRightsText = \"{$slconf['RightsText']}\";
1734 \$wgRightsIcon = \"{$slconf['RightsIcon']}\";
1735 # \$wgRightsCode = \"{$slconf['RightsCode']}\"; # Not yet used
1737 \$wgDiff3 = \"{$slconf['diff3']}\";
1739 # When you make changes to this configuration file, this will make
1740 # sure that cached pages are cleared.
1741 \$wgCacheEpoch = max( \$wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) );
1742 "; ## End of setting the $localsettings string
1744 // Keep things in Unix line endings internally;
1745 // the system will write out as local text type.
1746 return str_replace( "\r\n", "\n", $localsettings );
1749 function dieout( $text ) {
1750 global $mainListOpened;
1751 if( $mainListOpened ) echo( "</ul>" );
1752 if( $text != '' && substr( $text, 0, 2 ) != '<p' && substr( $text, 0, 2 ) != '<h' ){
1753 echo "<p>$text</p>\n";
1757 die( "\n\n</div>\n</div>\n</div>\n</div>\n</body>\n</html>" );
1760 function importVar( &$var, $name, $default = "" ) {
1761 if( isset( $var[$name] ) ) {
1762 $retval = $var[$name];
1763 if ( get_magic_quotes_gpc() ) {
1764 $retval = stripslashes( $retval );
1772 function importPost( $name, $default = "" ) {
1773 return importVar( $_POST, $name, $default );
1776 function importCheck( $name ) {
1777 return isset( $_POST[$name] );
1780 function importRequest( $name, $default = "" ) {
1781 return importVar( $_REQUEST, $name, $default );
1786 function aField( &$conf, $field, $text, $type = "text", $value = "", $onclick = '' ) {
1789 $xtype = "type=\"$type\"";
1795 $nolabel = ($type == "radio") ||
($type == "hidden");
1797 if ($type == 'radio')
1798 $id .= $radioCount++
;
1801 echo "<label class='column' for=\"$id\">$text</label>";
1804 if( $type == "radio" && $value == $conf->$field ) {
1805 $checked = "checked='checked'";
1809 echo "<input $xtype name=\"$field\" id=\"$id\" class=\"iput-$type\" $checked ";
1811 echo " onclick='toggleDBarea(\"$value\",1)' " ;
1814 if( $type == "radio" ) {
1815 echo htmlspecialchars( $value );
1817 echo htmlspecialchars( $conf->$field );
1823 echo "<label for=\"$id\">$text</label>";
1827 if(isset($errs[$field])) echo "<span class='error'>" . $errs[$field] . "</span>\n";
1830 function getLanguageList() {
1831 global $wgLanguageNames, $IP;
1832 if( !isset( $wgLanguageNames ) ) {
1833 require_once( "$IP/languages/Names.php" );
1838 $d = opendir( "../languages/messages" );
1839 /* In case we are called from the root directory */
1841 $d = opendir( "languages/messages");
1842 while( false !== ($f = readdir( $d ) ) ) {
1844 if( preg_match( '/Messages([A-Z][a-z_]+)\.php$/', $f, $m ) ) {
1845 $code = str_replace( '_', '-', strtolower( $m[1] ) );
1846 if( isset( $wgLanguageNames[$code] ) ) {
1847 $name = $code . ' - ' . $wgLanguageNames[$code];
1851 $codes[$code] = $name;
1859 #Check for location of an executable
1860 # @param string $loc single location to check
1861 # @param array $names filenames to check for.
1862 # @param mixed $versioninfo array of details to use when checking version, use false for no version checking
1863 function locate_executable($loc, $names, $versioninfo = false) {
1864 if (!is_array($names))
1865 $names = array($names);
1867 foreach ($names as $name) {
1868 $command = "$loc".DIRECTORY_SEPARATOR
."$name";
1869 if (@file_exists
($command)) {
1873 $file = str_replace('$1', $command, $versioninfo[0]);
1874 if (strstr(`
$file`
, $versioninfo[1]) !== false)
1881 # Test a memcached server
1882 function testMemcachedServer( $server ) {
1883 $hostport = explode(":", $server);
1886 if ( !function_exists( 'fsockopen' ) ) {
1887 $errstr = "Can't connect to memcached, fsockopen() not present";
1889 if ( !$errstr && count( $hostport ) != 2 ) {
1890 $errstr = 'Please specify host and port';
1893 list( $host, $port ) = $hostport;
1897 $fp = @fsockopen
( $host, $port, $errno, $fsockerr, 1.0 );
1898 if ( $fp === false ) {
1899 $errstr = "Cannot connect to memcached on $host:$port : $fsockerr";
1903 $command = "version\r\n";
1904 $bytes = fwrite( $fp, $command );
1905 if ( $bytes != strlen( $command ) ) {
1906 $errstr = "Cannot write to memcached socket on $host:$port";
1910 $expected = "VERSION ";
1911 $response = fread( $fp, strlen( $expected ) );
1912 if ( $response != $expected ) {
1913 $errstr = "Didn't get correct memcached response from $host:$port";
1920 echo "<li>Connected to memcached on $host:$port successfully";
1925 function database_picker($conf) {
1928 foreach(array_keys($ourdb) as $db) {
1929 if ($ourdb[$db]['havedriver']) {
1931 aField( $conf, "DBtype", $ourdb[$db]['fullname'], 'radio', $db, 'onclick');
1938 function database_switcher($db) {
1940 $color = $ourdb[$db]['bgcolor'];
1941 $full = $ourdb[$db]['fullname'];
1942 print "<fieldset id='$db'><legend>$full specific options</legend>\n";
1945 function printListItem( $item ) {
1946 print "<li>$item</li>";
1949 # Determine a suitable value for $wgShellLocale
1950 function getShellLocale( $wikiLang ) {
1951 # Give up now if we're in safe mode or open_basedir
1952 # It's theoretically possible but tricky to work with
1953 if ( wfIniGetBool( "safe_mode" ) ||
ini_get( 'open_basedir' ) ) {
1957 $os = php_uname( 's' );
1958 $supported = array( 'Linux', 'SunOS', 'HP-UX' ); # Tested these
1959 if ( !in_array( $os, $supported ) ) {
1963 # Get a list of available locales
1964 $lines = $ret = false;
1965 exec( '/usr/bin/locale -a', $lines, $ret );
1970 $lines = array_map( 'trim', $lines );
1971 $candidatesByLocale = array();
1972 $candidatesByLang = array();
1973 foreach ( $lines as $line ) {
1974 if ( $line === '' ) {
1977 if ( !preg_match( '/^([a-zA-Z]+)(_[a-zA-Z]+|)\.(utf8|UTF-8)(@[a-zA-Z_]*|)$/i', $line, $m ) ) {
1980 list( $all, $lang, $territory, $charset, $modifier ) = $m;
1981 $candidatesByLocale[$m[0]] = $m;
1982 $candidatesByLang[$lang][] = $m;
1985 # Try the current value of LANG
1986 if ( isset( $candidatesByLocale[ getenv( 'LANG' ) ] ) ) {
1987 return getenv( 'LANG' );
1990 # Try the most common ones
1991 $commonLocales = array( 'en_US.UTF-8', 'en_US.utf8', 'de_DE.UTF-8', 'de_DE.utf8' );
1992 foreach ( $commonLocales as $commonLocale ) {
1993 if ( isset( $candidatesByLocale[$commonLocale] ) ) {
1994 return $commonLocale;
1998 # Is there an available locale in the Wiki's language?
1999 if ( isset( $candidatesByLang[$wikiLang] ) ) {
2000 $m = reset( $candidatesByLang[$wikiLang] );
2004 # Are there any at all?
2005 if ( count( $candidatesByLocale ) ) {
2006 $m = reset( $candidatesByLocale );
2016 <div
class="license">
2018 <p
>This program is free software
; you can redistribute it
and/or modify
2019 it under the terms of the GNU General
Public License
as published by
2020 the Free Software Foundation
; either version
2 of the License
, or
2021 (at your option
) any later version
.</p
>
2023 <p
>This program is distributed in the hope that it will be useful
,
2024 but WITHOUT ANY WARRANTY
; without even the implied warranty of
2025 MERCHANTABILITY
or FITNESS
FOR A PARTICULAR PURPOSE
. See the
2026 GNU General
Public License
for more details
.</p
>
2028 <p
>You should have received
<a href
="../COPYING">a copy of the GNU General
Public License
</a
>
2029 along with this program
; if not
, write to the Free Software
2030 Foundation
, Inc
., 51 Franklin Street
, Fifth Floor
, Boston
, MA
02110-1301, USA
.
2031 or <a href
="http://www.gnu.org/copyleft/gpl.html">read it online
</a
></p
>
2037 <div id
="column-one">
2038 <div
class="portlet" id
="p-logo">
2039 <a style
="background-image: url(../skins/common/images/mediawiki.png);"
2040 href
="http://www.mediawiki.org/"
2041 title
="Main Page"></a
>
2043 <script type
="text/javascript"> if (window
.isMSIE55
) fixalpha(); </script
>
2044 <div
class='portlet'><div
class='pBody'>
2046 <li
><strong
><a href
="http://www.mediawiki.org/">MediaWiki home
</a
></strong
></li
>
2047 <li
><a href
="../README">Readme
</a
></li
>
2048 <li
><a href
="../RELEASE-NOTES">Release notes
</a
></li
>
2049 <li
><a href
="../docs/">Documentation
</a
></li
>
2050 <li
><a href
="http://www.mediawiki.org/wiki/Help:Contents">User
's Guide</a></li>
2051 <li><a href="http://www.mediawiki.org/wiki/Manual:Contents">Administrator's Guide
</a
></li
>
2052 <li
><a href
="http://www.mediawiki.org/wiki/Manual:FAQ">FAQ
</a
></li
>
2054 <p style
="font-size:90%;margin-top:1em">MediaWiki is Copyright ©
2001-2008 by Magnus Manske
, Brion Vibber
,
2055 Lee Daniel Crocker
, Tim Starling
, Erik Möller
, Gabriel Wicke
, Æ
var Arnfjörð Bjarmason
, Niklas Laxström
,
2056 Domas Mituzas
, Rob Church
, Yuri Astrakhan
, Aryeh Gregor
, Aaron Schulz
and others
.</p
>