2 # MediaWiki web-based config/installation
3 # Copyright (C) 2004 Brion Vibber <brion@pobox.com>
4 # http://www.mediawiki.org/
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License along
17 # with this program; if not, write to the Free Software Foundation, Inc.,
18 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 # http://www.gnu.org/copyleft/gpl.html
21 error_reporting( E_ALL
);
22 header( "Content-type: text/html; charset=utf-8" );
23 @ini_set
( "display_errors", true );
25 ?
><!DOCTYPE HTML
PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
26 "http://www.w3.org/TR/html4/loose.dtd">
29 <meta http
-equiv
="Content-type" content
="text/html; charset=utf-8">
30 <title
>MediaWiki installation
</title
>
31 <style type
="text/css">
33 @import
"../skins/monobook/main.css";
37 margin
: 1em
0 1em
2.5em
;
44 .config
-section label
.column
{
56 zoom
: 100%
; /* IE hack */
59 .config
-section
.config
-desc
{
66 .iput
-text
, .iput
-password
{
73 background
-color
: #fff;
81 background
-color
: #FFF0F0;
82 border
: 2px solid red
;
90 list-style
-type
: none
;
91 list-style
-image
: none
;
112 <div id
="globalWrapper">
113 <div id
="column-content">
115 <div id
="bodyContent">
120 # Relative includes seem to break if a parent directory is not readable;
121 # this is common for public_html subdirs under user home directories.
123 # As a dirty hack, we'll try to set up the include path first.
125 $IP = dirname( dirname( __FILE__
) );
126 $sep = PATH_SEPARATOR
;
127 ini_set( "include_path", ".$sep$IP$sep$IP/includes$sep$IP/languages" );
129 define( "MEDIAWIKI", true );
130 define( "MEDIAWIKI_INSTALL", true );
131 require_once( "includes/Defines.php" );
132 require_once( "includes/DefaultSettings.php" );
133 require_once( "includes/MagicWord.php" );
134 require_once( "includes/Namespace.php" );
137 <h1
>MediaWiki
<?php
print $wgVersion ?
> installation
</h1
>
141 /* Check for existing configurations and bug out! */
143 if( file_exists( "../LocalSettings.php" ) ) {
144 dieout( " <p><strong>Setup has completed, <a href='../index.php'>your wiki</a> is configured.</strong></p>
146 <p>Please delete the /config directory for extra security.</p></div></div></div></div>" );
149 if( file_exists( "./LocalSettings.php" ) ) {
150 writeSuccessMessage();
155 if( !is_writable( "." ) ) {
156 dieout( "<h2>Can't write config file, aborting</h2>
158 <p>In order to configure the wiki you have to make the <tt>config</tt> subdirectory
159 writable by the web server. Once configuration is done you'll move the created
160 <tt>LocalSettings.php</tt> to the parent directory, and for added safety you can
161 then remove the <tt>config</tt> subdirectory entirely.</p>
163 <p>To make the directory writable on a Unix/Linux system:</p>
166 cd <i>/path/to/wiki</i>
172 require_once( "install-utils.inc" );
173 require_once( "maintenance/updaters.inc" );
176 function getEncoded( $data ) {
177 # removing latin1 support, no need...
180 function getSitename() { return $this->getEncoded( $this->Sitename
); }
181 function getSysopName() { return $this->getEncoded( $this->SysopName
); }
182 function getSysopPass() { return $this->getEncoded( $this->SysopPass
); }
187 <h2
>Checking environment
...</h2
>
188 <p
><em
>Please
include all of the lines below when reporting installation problems
.</em
></p
>
189 <ul
class="env-check">
193 $wgNoOutputBuffer = true;
194 $conf = new ConfigData
;
196 install_version_checks();
198 print "<li>PHP " . phpversion() . " installed</li>\n";
200 if( ini_get( "register_globals" ) ) {
203 <div style
="font-size:110%">
204 <strong
class="error">Warning
:</strong
>
205 <strong
>PHP
's <tt><a href="http://php.net/register_globals">register_globals</a></tt> option is enabled. Disable it if you can.</strong>
207 MediaWiki will work, but your server is more exposed to PHP-based security vulnerabilities.
214 if( ini_get( "magic_quotes_runtime" ) ) {
216 ?><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>
217 This option corrupts data input unpredictably
; you cannot install
or use
218 MediaWiki unless this option is disabled
.
222 if( ini_get( "magic_quotes_sybase" ) ) {
224 ?
><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
>
225 This option corrupts data input unpredictably
; you cannot install
or use
226 MediaWiki unless this option is disabled
.
230 if( ini_get( "mbstring.func_overload" ) ) {
232 ?
><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
>
233 This option causes errors
and may corrupt data unpredictably
;
234 you cannot install
or use MediaWiki unless this option is disabled
.
239 dieout( "</ul><p>Cannot install Mediawiki.</p>" );
242 if( ini_get( "safe_mode" ) ) {
243 $conf->safeMode
= true;
245 <li
><b
class='error'>Warning
:</b
> <strong
>PHP
's
246 <a href='http
://www.php.net/features.safe-mode'>safe mode</a> is active.</strong>
247 You may have problems caused by this
, particularly
if using image uploads
.
251 $conf->safeMode
= false;
255 $sapi = php_sapi_name();
256 $conf->prettyURLs
= true;
257 print "<li>PHP server API is $sapi; ";
260 case "apache2handler":
261 print "ok, using pretty URLs (<tt>index.php/Page_Title</tt>)";
267 case "apache2filter":
269 print "using ugly URLs (<tt>index.php?title=Page_Title</tt>)";
270 $conf->prettyURLs
= false;
275 $conf->xml
= function_exists( "utf8_encode" );
277 print "<li>Have XML / Latin1-UTF-8 conversion support.</li>\n";
279 dieout( "PHP's XML module is missing; the wiki requires functions in
280 this module and won't work in this configuration.
281 If you're running Mandrake, install the php-xml package." );
284 $memlimit = ini_get( "memory_limit" );
285 $conf->raiseMemory
= false;
286 if( empty( $memlimit ) ||
$memlimit == -1 ) {
287 print "<li>PHP is configured with no <tt>memory_limit</tt>.</li>\n";
289 print "<li>PHP's <tt>memory_limit</tt> is " . htmlspecialchars( $memlimit ) . ". <strong>If this is too low, installation may fail!</strong> ";
290 $n = intval( $memlimit );
291 if( preg_match( '/^([0-9]+)[Mm]$/', trim( $memlimit ), $m ) ) {
292 $n = intval( $m[1] * (1024*1024) );
294 if( $n < 20*1024*1024 ) {
295 print "Attempting to raise limit to 20M... ";
296 if( false === ini_set( "memory_limit", "20M" ) ) {
299 $conf->raiseMemory
= true;
306 $conf->zlib
= function_exists( "gzencode" );
308 print "<li>Have zlib support; enabling output compression.</li>\n";
310 print "<li>No zlib support.</li>\n";
313 $conf->turck
= function_exists( 'mmcache_get' );
314 if ( $conf->turck
) {
315 print "<li><a href=\"http://turck-mmcache.sourceforge.net/\">Turck MMCache</a> installed</li>\n";
317 $conf->eaccel
= function_exists( 'eaccelerator_get' );
318 if ( $conf->eaccel
) {
319 $conf->turck
= 'eaccelerator';
320 print "<li><a href=\"http://eaccelerator.sourceforge.net/\">eAccelerator</a> installed</li>\n";
322 if (!$conf->turck
&& !$conf->eaccel
) {
323 print "<li>Neither <a href=\"http://turck-mmcache.sourceforge.net/\">Turck MMCache</a> nor <a href=\"http://eaccelerator.sourceforge.net/\">eAccelerator</a> are installed, " .
324 "can't use object caching functions</li>\n";
327 $conf->diff3
= false;
328 $diff3locations = array("/usr/bin", "/opt/csw/bin", "/usr/gnu/bin", "/usr/sfw/bin") +
explode($sep, getenv("PATH"));
329 $diff3names = array("gdiff3", "diff3", "diff3.exe");
331 $diff3versioninfo = array('$1 --version 2>&1', 'diff3 (GNU diffutils)');
332 foreach ($diff3locations as $loc) {
333 $exe = locate_executable($loc, $diff3names, $diff3versioninfo);
334 if ($exe !== false) {
341 print "<li>Found GNU diff3: <tt>$conf->diff3</tt>.</li>";
343 print "<li>GNU diff3 not found.</li>";
345 $conf->ImageMagick
= false;
346 $imcheck = array( "/usr/bin", "/usr/local/bin", "/sw/bin", "/opt/local/bin" );
347 foreach( $imcheck as $dir ) {
348 $im = "$dir/convert";
349 if( file_exists( $im ) ) {
350 print "<li>Found ImageMagick: <tt>$im</tt>; image thumbnailing will be enabled if you enable uploads.</li>\n";
351 $conf->ImageMagick
= $im;
356 $conf->HaveGD
= function_exists( "imagejpeg" );
357 if( $conf->HaveGD
) {
358 print "<li>Found GD graphics library built-in";
359 if( !$conf->ImageMagick
) {
360 print ", image thumbnailing will be enabled if you enable uploads";
364 if( !$conf->ImageMagick
) {
365 print "<li>Couldn't find GD library or ImageMagick; image thumbnailing disabled.</li>\n";
369 $conf->UseImageResize
= $conf->HaveGD ||
$conf->ImageMagick
;
371 # $conf->IP = "/Users/brion/Sites/inplace";
372 $conf->IP
= dirname( dirname( __FILE__
) );
373 print "<li>Installation directory: <tt>" . htmlspecialchars( $conf->IP
) . "</tt></li>\n";
375 # $conf->ScriptPath = "/~brion/inplace";
376 $conf->ScriptPath
= preg_replace( '{^(.*)/config.*$}', '$1', $_SERVER["PHP_SELF"] ); # was SCRIPT_NAME
377 print "<li>Script URI path: <tt>" . htmlspecialchars( $conf->ScriptPath
) . "</tt></li>\n";
379 print "<li style='font-weight:bold;color:green;font-size:110%'>Environment checked. You can install MediaWiki.</li>\n";
380 $conf->posted
= ($_SERVER["REQUEST_METHOD"] == "POST");
382 $conf->Sitename
= ucfirst( importPost( "Sitename", "" ) );
383 $defaultEmail = empty( $_SERVER["SERVER_ADMIN"] )
385 : $_SERVER["SERVER_ADMIN"];
386 $conf->EmergencyContact
= importPost( "EmergencyContact", $defaultEmail );
387 $conf->DBtype
= importPost( "DBtype", "mysql" );
388 $conf->DBserver
= importPost( "DBserver", "localhost" );
389 $conf->DBname
= importPost( "DBname", "wikidb" );
390 $conf->DBuser
= importPost( "DBuser", "wikiuser" );
391 $conf->DBpassword
= importPost( "DBpassword" );
392 $conf->DBpassword2
= importPost( "DBpassword2" );
393 $conf->DBprefix
= importPost( "DBprefix" );
394 $conf->DBmysql5
= (importPost( "DBmysql5" ) == "true") ?
"true" : "false";
395 $conf->RootPW
= importPost( "RootPW" );
396 $conf->LanguageCode
= importPost( "LanguageCode", "en" );
397 $conf->SysopName
= importPost( "SysopName", "WikiSysop" );
398 $conf->SysopPass
= importPost( "SysopPass" );
399 $conf->SysopPass2
= importPost( "SysopPass2" );
401 /* Check for validity */
404 if( $conf->Sitename
== "" ||
$conf->Sitename
== "MediaWiki" ||
$conf->Sitename
== "Mediawiki" ) {
405 $errs["Sitename"] = "Must not be blank or \"MediaWiki\"";
407 if( $conf->DBuser
== "" ) {
408 $errs["DBuser"] = "Must not be blank";
410 if( $conf->DBpassword
== "" ) {
411 $errs["DBpassword"] = "Must not be blank";
413 if( $conf->DBpassword
!= $conf->DBpassword2
) {
414 $errs["DBpassword2"] = "Passwords don't match!";
416 if( !preg_match( '/^[A-Za-z_0-9]*$/', $conf->DBprefix
) ) {
417 $errs["DBprefix"] = "Invalid table prefix";
420 if( $conf->SysopPass
== "" ) {
421 $errs["SysopPass"] = "Must not be blank";
423 if( $conf->SysopPass
!= $conf->SysopPass2
) {
424 $errs["SysopPass2"] = "Passwords don't match!";
427 $conf->License
= importRequest( "License", "none" );
428 if( $conf->License
== "gfdl" ) {
429 $conf->RightsUrl
= "http://www.gnu.org/copyleft/fdl.html";
430 $conf->RightsText
= "GNU Free Documentation License 1.2";
431 $conf->RightsCode
= "gfdl";
432 $conf->RightsIcon
= '${wgStylePath}/common/images/gnu-fdl.png';
433 } elseif( $conf->License
== "none" ) {
434 $conf->RightsUrl
= $conf->RightsText
= $conf->RightsCode
= $conf->RightsIcon
= "";
436 $conf->RightsUrl
= importRequest( "RightsUrl", "" );
437 $conf->RightsText
= importRequest( "RightsText", "" );
438 $conf->RightsCode
= importRequest( "RightsCode", "" );
439 $conf->RightsIcon
= importRequest( "RightsIcon", "" );
442 $conf->Shm
= importRequest( "Shm", "none" );
443 $conf->MCServers
= importRequest( "MCServers" );
445 /* Test memcached servers */
447 if ( $conf->Shm
== 'memcached' && $conf->MCServers
) {
448 $conf->MCServerArray
= array_map( 'trim', explode( ',', $conf->MCServers
) );
449 foreach ( $conf->MCServerArray
as $server ) {
450 $error = testMemcachedServer( $server );
452 $errs["MCServers"] = $error;
456 } else if ( $conf->Shm
== 'memcached' ) {
457 $errs["MCServers"] = "Please specify at least one server if you wish to use memcached";
460 /* default values for installation */
461 $conf->Email
=importRequest("Email", "email_enabled");
462 $conf->Emailuser
=importRequest("Emailuser", "emailuser_enabled");
463 $conf->Enotif
=importRequest("Enotif", "enotif_allpages");
464 $conf->Eauthent
=importRequest("Eauthent", "eauthent_enabled");
466 if( $conf->posted
&& ( 0 == count( $errs ) ) ) {
467 do { /* So we can 'continue' to end prematurely */
468 $conf->Root
= ($conf->RootPW
!= "");
470 /* Load up the settings and get installin' */
471 $local = writeLocalSettings( $conf );
472 $wgCommandLineMode = false;
475 if (!in_array($conf->DBtype
, array("mysql", "oracle"))) {
476 $errs["DBtype"] = "Unknown database type.";
479 print "<li>Database type: {$conf->DBtype}</li>\n";
480 $dbclass = 'Database'.ucfirst($conf->DBtype
);
481 require_once("$dbclass.php");
482 $wgDBtype = $conf->DBtype
;
483 $wgDBadminuser = "root";
484 $wgDBadminpassword = $conf->RootPW
;
485 $wgDBprefix = $conf->DBprefix
;
486 $wgCommandLineMode = true;
487 $wgUseDatabaseMessages = false; /* FIXME: For database failure */
488 require_once( "includes/Setup.php" );
491 require_once( "maintenance/InitialiseMessages.inc" );
493 $wgTitle = Title
::newFromText( "Installation script" );
494 $mysqlOldClient = version_compare( mysql_get_client_info(), "4.1.0", "lt" );
495 if( $mysqlOldClient ) {
496 print "<li><b>PHP is linked with old MySQL client libraries. If you are
497 using a MySQL 4.1 server and have problems connecting to the database,
498 see <a href='http://dev.mysql.com/doc/mysql/en/old-client.html'
499 >http://dev.mysql.com/doc/mysql/en/old-client.html</a> for help.</b></li>\n";
502 if ($conf->DBtype
== 'mysql') {
503 print "<li>Trying to connect to database server on $wgDBserver as root...\n";
504 $wgDatabase = $dbc->newFromParams( $wgDBserver, "root", $conf->RootPW
, "", 1 );
506 if( $wgDatabase->isOpen() ) {
507 $myver = get_db_version();
508 $wgDatabase->ignoreErrors(true);
510 print "<ul><li>Connected as root (automatic)</li></ul></li>\n";
512 print "<ul><li>MySQL error " . ($err = mysql_errno() ) .
513 ": " . htmlspecialchars( mysql_error() ) . "</li></ul></li>";
519 $errs["RootPW"] = "Check password";
521 print "<li>Trying regular user...\n";
522 /* Try the regular user... */
523 $wgDBadminuser = $wgDBuser;
524 $wgDBadminpassword = $wgDBpassword;
525 /* Wait one second for connection rate limiting, present on some systems */
527 $wgDatabase = Database
::newFromParams( $wgDBserver, $wgDBuser, $wgDBpassword, "", 1 );
528 if( !$wgDatabase->isOpen() ) {
529 print "<ul><li>MySQL error " . ($err = mysql_errno() ) .
530 ": " . htmlspecialchars( mysql_error() ) . "</li></ul></li>";
531 $errs["DBuser"] = "Check name/pass";
532 $errs["DBpassword"] = "or enter root";
533 $errs["DBpassword2"] = "password below";
534 $errs["RootPW"] = "Got root?";
536 $myver = mysql_get_server_info( $wgDatabase->mConn
);
537 $wgDatabase->ignoreErrors(true);
548 $errs["DBserver"] = "Connection failed";
551 $errs["DBserver"] = "Couldn't connect to database";
556 } else /* not mysql */ {
557 print "<li>Connecting to SQL server...";
558 $wgDatabase = $dbc->newFromParams($wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname, 1);
559 if (!$wgDatabase->isOpen()) {
560 print " error: " . $wgDatabase->lastError() . "</li>\n";
562 $wgDatabase->ignoreErrors(true);
563 $myver = get_db_version();
567 if ( !$wgDatabase->isOpen() ) {
568 $errs["DBserver"] = "Couldn't connect to database";
572 print "<li>Connected to $myver";
573 if( version_compare( $myver, "4.0.0" ) < 0 ) {
574 die( " -- mysql 4.0 or later required. Aborting." );
576 $mysqlNewAuth = version_compare( $myver, "4.1.0", "ge" );
577 if( $mysqlNewAuth && $mysqlOldClient ) {
578 print "; <b class='error'>You are using MySQL 4.1 server, but PHP is linked
579 to old client libraries; if you have trouble with authentication, see
580 <a href='http://dev.mysql.com/doc/mysql/en/old-client.html'
581 >http://dev.mysql.com/doc/mysql/en/old-client.html</a> for help.</b>";
584 if( $mysqlNewAuth ) {
585 print "; enabling MySQL 4.1/5.0 charset mode";
587 print "; <b class='error'>MySQL 4.1/5.0 charset mode enabled,
588 but older version detected; will likely fail.</b>";
593 if ($conf->DBtype
== 'mysql') {
594 @$sel = mysql_select_db( $wgDBname, $wgDatabase->mConn
);
596 print "<li>Database <tt>" . htmlspecialchars( $wgDBname ) . "</tt> exists</li>\n";
598 $err = mysql_errno();
599 if ( $err != 1049 ) {
600 print "<ul><li>Error selecting database $wgDBname: $err " .
601 htmlspecialchars( mysql_error() ) . "</li></ul>";
604 $res = $wgDatabase->query( "CREATE DATABASE `$wgDBname`" );
606 print "<li>Couldn't create database <tt>" .
607 htmlspecialchars( $wgDBname ) .
608 "</tt>; try with root access or check your username/pass.</li>\n";
609 $errs["RootPW"] = "<- Enter";
612 print "<li>Created database <tt>" . htmlspecialchars( $wgDBname ) . "</tt></li>\n";
614 $wgDatabase->selectDB( $wgDBname );
618 if( $wgDatabase->tableExists( "cur" ) ||
$wgDatabase->tableExists( "revision" ) ) {
619 print "<li>There are already MediaWiki tables in this database. Checking if updates are needed...</li>\n";
621 # Create user if required
623 $conn = Database
::newFromParams( $wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname, 1 );
624 if ( $conn->isOpen() ) {
625 print "<li>DB user account ok</li>\n";
628 print "<li>Granting user permissions...";
629 if( $mysqlOldClient && $mysqlNewAuth ) {
630 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>";
633 dbsource( "../maintenance/users.sql", $wgDatabase );
643 print "<li>Finished update checks.</li>\n";
645 # FIXME: Check for errors
646 print "<li>Creating tables...";
647 if ($conf->DBtype
== 'mysql') {
649 print " using MySQL 5 table defs...";
650 dbsource( "../maintenance/mysql5/tables.sql", $wgDatabase );
652 print " using MySQL 4 table defs...";
653 dbsource( "../maintenance/tables.sql", $wgDatabase );
655 dbsource( "../maintenance/interwiki.sql", $wgDatabase );
657 dbsource( "../maintenance/oracle/tables.sql", $wgDatabase );
658 dbsource( "../maintenance/oracle/interwiki.sql", $wgDatabase );
661 print " done.</li>\n";
663 print "<li>Initializing data...";
664 $wgDatabase->insert( 'site_stats',
665 array( 'ss_row_id' => 1,
666 'ss_total_views' => 0,
667 'ss_total_edits' => 0,
668 'ss_good_articles' => 0 ) );
669 # setting up the db user
671 print "<li>Granting user permissions...</li>\n";
672 dbsource( "../maintenance/users.sql", $wgDatabase );
675 if( $conf->SysopName
) {
676 $u = User
::newFromName( $conf->getSysopName() );
677 if ( 0 == $u->idForName() ) {
679 $u->setPassword( $conf->getSysopPass() );
682 $u->addGroup( "sysop" );
683 $u->addGroup( "bureaucrat" );
685 print "<li>Created sysop account <tt>" .
686 htmlspecialchars( $conf->SysopName
) . "</tt>.</li>\n";
688 print "<li>Could not create user - already exists!</li>\n";
691 print "<li>Skipped sysop account creation, no name given.</li>\n";
694 $titleobj = Title
::newFromText( wfMsgNoDB( "mainpage" ) );
695 $article = new Article( $titleobj );
696 $newid = $article->insertOn( $wgDatabase );
697 $revision = new Revision( array(
699 'text' => wfMsg( 'mainpagetext' ) . "\n\n" . wfMsg( 'mainpagedocfooter' ),
702 'user_text' => 'MediaWiki default',
704 $revid = $revision->insertOn( $wgDatabase );
705 $article->updateRevisionOn( $wgDatabase, $revision );
708 initialiseMessages();
709 print "</pre></li>\n";
712 /* Write out the config file now that all is well */
713 print "<p>Creating LocalSettings.php...</p>\n\n";
714 $localSettings = "<" . "?php$endl$local$endl?" . ">";
715 // Fix up a common line-ending problem (due to CVS on Windows)
716 $localSettings = str_replace( "\r\n", "\n", $localSettings );
718 if( version_compare( phpversion(), "4.3.2" ) >= 0 ) {
719 $xt = "xt"; # Refuse to overwrite an existing file
721 $xt = "wt"; # 'x' is not available prior to PHP 4.3.2. We did check above, but race conditions blah blah
723 $f = fopen( "LocalSettings.php", $xt );
726 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" .
727 "<p>Here's the file that would have been written, try to paste it into place manually:</p>\n" .
728 "<pre>\n" . htmlspecialchars( $localSettings ) . "</pre>\n" );
730 if(fwrite( $f, $localSettings ) ) {
732 writeSuccessMessage();
735 die("<p class='error'>An error occured while writing the config/LocalSettings.php file. Check user rights and disk space then try again.</p>\n");
747 if( count( $errs ) ) {
748 /* Display options form */
750 if( $conf->posted
) {
751 echo "<p class='error-top'>Something's not quite right yet; make sure everything below is filled out correctly.</p>\n";
755 <form action
="index.php" name
="config" method
="post">
760 <div
class="config-section">
761 <div
class="config-input">
763 aField( $conf, "Sitename", "Wiki name:" );
766 <p
class="config-desc">
767 Preferably a short word without punctuation
, i
.e
. "Wikipedia".<br
>
768 Will appear
as the
namespace name
for "meta" pages
, and throughout the
interface.
771 <div
class="config-input">
773 aField( $conf, "EmergencyContact", "Contact e-mail:" );
776 <p
class="config-desc">
777 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
.
780 <div
class="config-input">
781 <label
class='column' for="LanguageCode">Language
:</label
>
782 <select id
="LanguageCode" name
="LanguageCode">
785 $list = getLanguageList();
786 foreach( $list as $code => $name ) {
787 $sel = ($code == $conf->LanguageCode
) ?
'selected="selected"' : '';
788 echo "\t\t<option value=\"$code\" $sel>$name</option>\n";
793 <p
class="config-desc">
794 Select the language
for your wiki
's interface. Some localizations aren't fully complete
. Unicode (UTF
-8) used
for all localizations
.
797 <div
class="config-input">
798 <label
class='column'>Copyright
/license
:</label
>
801 <li
><?php
aField( $conf, "License", "No license metadata", "radio", "none" ); ?
></li
>
802 <li
><?php
aField( $conf, "License", "GNU Free Documentation License 1.2 (Wikipedia-compatible)", "radio", "gfdl" ); ?
></li
>
804 aField( $conf, "License", "A Creative Commons license - ", "radio", "cc" );
805 $partner = "MediaWiki";
806 $exit = urlencode( "$wgServer{$conf->ScriptPath}/config/index.php?License=cc&RightsUrl=[license_url]&RightsText=[license_name]&RightsCode=[license_code]&RightsIcon=[license_button]" );
807 $icon = urlencode( "$wgServer$wgUploadPath/wiki.png" );
808 $ccApp = htmlspecialchars( "http://creativecommons.org/license/?partner=$partner&exit_url=$exit&partner_icon_url=$icon" );
809 print "<a href=\"$ccApp\" target='_blank'>choose</a>";
811 <?php
if( $conf->License
== "cc" ) { ?
>
813 <li
><?php
aField( $conf, "RightsIcon", "<img src=\"" . htmlspecialchars( $conf->RightsIcon
) . "\" alt='icon' />", "hidden" ); ?
></li
>
814 <li
><?php
aField( $conf, "RightsText", htmlspecialchars( $conf->RightsText
), "hidden" ); ?
></li
>
815 <li
><?php
aField( $conf, "RightsCode", "code: " . htmlspecialchars( $conf->RightsCode
), "hidden" ); ?
></li
>
816 <li
><?php
aField( $conf, "RightsUrl", "<a href=\"" . htmlspecialchars( $conf->RightsUrl
) . "\">" . htmlspecialchars( $conf->RightsUrl
) . "</a>", "hidden" ); ?
></li
>
822 <p
class="config-desc">
823 A notice
, icon
, and machine
-readable copyright metadata will be displayed
for the license you pick
.
827 <div
class="config-input">
828 <?php
aField( $conf, "SysopName", "Admin username:" ) ?
>
830 <div
class="config-input">
831 <?php
aField( $conf, "SysopPass", "Password:", "password" ) ?
>
833 <div
class="config-input">
834 <?php
aField( $conf, "SysopPass2", "Password confirm:", "password" ) ?
>
836 <p
class="config-desc">
837 An admin can lock
/delete pages
, block users from editing
, and other maintenance tasks
.<br
>
838 A
new account will be added only when creating a
new wiki database
.
841 <div
class="config-input">
842 <label
class='column'>Shared memory caching
:</label
>
845 <li
><?php
aField( $conf, "Shm", "No caching", "radio", "none" ); ?
></li
>
847 if ( $conf->turck
) {
849 aField( $conf, "Shm", "Turck MMCache", "radio", "turck" );
854 if ( $conf->eaccel
) {
856 aField( $conf, "Shm", "eAccelerator", "radio", "eaccel" );
860 <li
><?php
aField( $conf, "Shm", "Memcached", "radio", "memcached" ); ?
></li
>
862 <div style
="clear:left"><?php
aField( $conf, "MCServers", "Memcached servers:", "text" ) ?
></div
>
864 <p
class="config-desc">
865 Using a shared memory system such
as Turck MMCache
, eAccelerator
, or Memcached will speed
866 up MediaWiki significantly
. Memcached is the best solution but needs to be
867 installed
. Specify the server addresses
and ports in a comma
-separted
list. Only
868 use Turck shared memory
if the wiki will be running on a single Apache server
.
872 <h2
>E
-mail
, e
-mail notification
and authentication setup
</h2
>
874 <div
class="config-section">
875 <div
class="config-input">
876 <label
class='column'>E
-mail (general
):</label
>
878 <li
><?php
aField( $conf, "Email", "Enabled", "radio", "email_enabled" ); ?
></li
>
879 <li
><?php
aField( $conf, "Email", "Disabled", "radio", "email_disabled" ); ?
></li
>
882 <p
class="config-desc">
883 Use this to disable all e
-mail
functions (send a password reminder
, user
-to
-user e
-mail
and e
-mail notification
),
884 if sending e
-mails on your server doesn
't work.
886 <div class="config-input">
887 <label class='column
'>User-to-user e-mail:</label>
889 <li><?php aField( $conf, "Emailuser", "Enabled", "radio", "emailuser_enabled" ); ?></li>
890 <li><?php aField( $conf, "Emailuser", "Disabled", "radio", "emailuser_disabled" ); ?></li>
893 <p class="config-desc">
894 Use this to disable only the user-to-user e-mail function (EmailUser).
896 <div class="config-input">
897 <label class='column
'>E-mail notification:</label>
899 <li><?php aField( $conf, "Enotif", "Disabled", "radio", "enotif_disabled" ); ?></li>
900 <li><?php aField( $conf, "Enotif", "Enabled for user_talk changes only", "radio", "enotif_usertalk" ); ?></li>
901 <li><?php aField( $conf, "Enotif", "Enabled for user_talk and watch list changes (not recommended for large wikis)", "radio", "enotif_allpages" ); ?></li>
904 <div class="config-desc">
906 E-mail notification sends a notification e-mail to a user, when the user_talk page is changed
907 and/or when watch-listed pages are changed, depending on the above settings.
908 When testing this feature, be reminded, that obviously an e-mail address must be present in your preferences
909 and that your own changes never trigger notifications to be sent to yourself.</p>
911 <p>Users get corresponding options to select or deselect in their users' preferences
.
912 The user options are not shown on the preference page
, if e
-mail notification is disabled
.</p
>
914 <p
>There are additional options
for fine tuning in
/includes
/DefaultSettings
.php
.</p
>
917 <div
class="config-input">
918 <label
class='column'>E
-mail authentication
:</label
>
920 <li
><?php
aField( $conf, "Eauthent", "Disabled", "radio", "eauthent_disabled" ); ?
></li
>
921 <li
><?php
aField( $conf, "Eauthent", "Enabled", "radio", "eauthent_enabled" ); ?
></li
>
924 <div
class="config-desc">
925 <p
>E
-mail address authentication uses a scheme to authenticate e
-mail addresses of the users
. The user who initially enters
or changes his
/her stored e
-mail address
926 gets a link with a token mailed to that address
. The stored e
-mail address is authenticated at the moment the user comes back to the wiki via the link
.</p
>
928 <p
>The e
-mail address stays authenticated
as long
as the user does not change it
; the time of authentication is indicated
929 on the user preference page
.</p
>
931 <p
>If the option is enabled
, only authenticated e
-mail addresses can receive EmailUser mails
and/or
932 e
-mail notification mails
.</p
>
937 <h2
>Database config
</h2
>
939 <div
class="config-section">
940 <div
class="config-input">
941 <label
class='column'>Database type
:</label
>
943 <li
><?php
aField( $conf, "DBtype", "MySQL", "radio", "mysql"); ?
></li
>
944 <li
><?php
aField( $conf, "DBtype", "Oracle", "radio", "oracle" ); ?
></li
>
948 <div
class="config-input" style
="clear:left"><?php
949 aField( $conf, "DBserver", "SQL server host:" );
951 <p
class="config-desc">
952 If your database server isn
't on your web server, enter the name
953 or IP address here. MySQL only.
956 <div class="config-input"><?php
957 aField( $conf, "DBname", "Database name:" );
959 <div class="config-desc">
960 If using Oracle, set this to your connection identifier.
962 <div class="config-input"><?php
963 aField( $conf, "DBuser", "DB username:" );
965 <div class="config-input"><?php
966 aField( $conf, "DBpassword", "DB password:", "password" );
968 <div class="config-input"><?php
969 aField( $conf, "DBpassword2", "DB password confirm:", "password" );
971 <p class="config-desc">
972 If you only have a single user account and database available,
973 enter those here. If you have database root access (see below)
974 you can specify new accounts/databases to be created.
977 <div class="config-input"><?php
978 aField( $conf, "DBprefix", "Database table prefix:" );
980 <div class="config-desc">
981 <p>If you need to share one database between multiple wikis, or
982 MediaWiki and another web application, you may choose to
983 add a prefix to all the table names to avoid conflicts.</p>
985 <p>Avoid exotic characters; something like <tt>mw_</tt> is good.</p>
988 <div class="config-input"><label class="column">Database charset</label>
989 <div>Select one:</div>
991 <li><?php aField( $conf, "DBmysql5", "Backwards-compatible UTF-8", "radio", "false" ); ?></li>
992 <li><?php aField( $conf, "DBmysql5", "Experimental MySQL 4.1/5.0 UTF-8", "radio", "true" ); ?></li>
995 <p class="config-desc">
996 <b>EXPERIMENTAL:</b> You can enable explicit Unicode charset support
997 for MySQL 4.1 and 5.0 servers. This is not well tested and may
998 cause things to break. <b>If upgrading an older installation, leave
999 in backwards-compatible mode.</b>
1002 <div class="config-input">
1004 aField( $conf, "RootPW", "DB root password:", "password" );
1007 <p class="config-desc">
1008 You will only need this if the database and/or user account
1009 above don't already exist
.
1010 Do <em
>not
</em
> type in your machine
's root password! MySQL
1011 has its own "root" user with a separate password. (It might
1012 even be blank, depending on your configuration.)
1015 <div class="config-input" style="padding:2em 0 3em">
1016 <label class='column
'> </label>
1017 <input type="submit" value="Install MediaWiki!" class="btn-install" />
1027 /* -------------------------------------------------------------------------------------- */
1028 function writeSuccessMessage() {
1030 if ( ini_get( 'safe_mode
' ) && !ini_get( 'open_basedir
' ) ) {
1032 <p>Installation successful!</p>
1033 <p>To complete the installation, please do the following:
1035 <li>Download config/LocalSettings.php with your FTP client or file manager</li>
1036 <li>Upload it to the parent directory</li>
1037 <li>Delete config/LocalSettings.php</li>
1038 <li>Start using <a href='../index
.php
'>your wiki</a>!
1040 <p>If you are in a shared hosting environment, do <strong>not</strong> just move LocalSettings.php
1041 remotely. LocalSettings.php is currently owned by the user your webserver is running under,
1042 which means that anyone on the same server can read your database password! Downloading
1043 it and uploading it again will hopefully change the ownership to a user ID specific to you.</p>
1046 echo "<p>Installation successful! Move the config/LocalSettings.php file into the parent directory, then follow
1047 <a href='../index
.php
'>this link</a> to your wiki.</p>\n";
1052 function escapePhpString( $string ) {
1053 return strtr( $string,
1064 function writeLocalSettings( $conf ) {
1065 $conf->UseImageResize = $conf->UseImageResize ? 'true' : 'false';
1066 $conf->PasswordSender = $conf->EmergencyContact;
1067 $zlib = ($conf->zlib ? "" : "# ");
1068 $magic = ($conf->ImageMagick ? "" : "# ");
1069 $convert = ($conf->ImageMagick ? $conf->ImageMagick : "/usr/bin/convert" );
1070 $pretty = ($conf->prettyURLs ? "" : "# ");
1071 $ugly = ($conf->prettyURLs ? "# " : "");
1072 $rights = ($conf->RightsUrl) ? "" : "# ";
1073 $hashedUploads = $conf->safeMode ? '' : '# ';
1075 switch ( $conf->Shm
) {
1077 $cacheType = 'CACHE_MEMCACHED';
1078 $mcservers = var_export( $conf->MCServerArray
, true );
1082 $cacheType = 'CACHE_ACCEL';
1083 $mcservers = 'array()';
1086 $cacheType = 'CACHE_NONE';
1087 $mcservers = 'array()';
1090 if ( $conf->Email
== 'email_enabled' ) {
1091 $enableemail = 'true';
1092 $enableuseremail = ( $conf->Emailuser
== 'emailuser_enabled' ) ?
'true' : 'false' ;
1093 $eauthent = ( $conf->Eauthent
== 'eauthent_enabled' ) ?
'true' : 'false' ;
1094 switch ( $conf->Enotif
) {
1095 case 'enotif_usertalk':
1096 $enotifusertalk = 'true';
1097 $enotifwatchlist = 'false';
1099 case 'enotif_allpages':
1100 $enotifusertalk = 'true';
1101 $enotifwatchlist = 'true';
1104 $enotifusertalk = 'false';
1105 $enotifwatchlist = 'false';
1108 $enableuseremail = 'false';
1109 $enableemail = 'false';
1110 $eauthent = 'false';
1111 $enotifusertalk = 'false';
1112 $enotifwatchlist = 'false';
1115 $file = @fopen
( "/dev/urandom", "r" );
1117 $secretKey = bin2hex( fread( $file, 32 ) );
1121 for ( $i=0; $i<8; $i++
) {
1122 $secretKey .= dechex(mt_rand(0, 0x7fffffff));
1124 print "<li>Warning: \$wgSecretKey key is insecure, generated with mt_rand(). Consider changing it manually.</li>\n";
1127 # Add slashes to strings for double quoting
1128 $slconf = array_map( "escapePhpString", get_object_vars( $conf ) );
1129 if( $conf->License
== 'gfdl' ) {
1130 # Needs literal string interpolation for the current style path
1131 $slconf['RightsIcon'] = $conf->RightsIcon
;
1134 $sep = PATH_SEPARATOR
;
1136 # This file was automatically generated by the MediaWiki installer.
1137 # If you make manual changes, please keep track in case you need to
1138 # recreate them later.
1140 # See includes/DefaultSettings.php for all configurable settings
1141 # and their default values, but don't forget to make changes in _this_
1144 \$IP = \"{$slconf['IP']}\";
1145 ini_set( \"include_path\", \".$sep\$IP$sep\$IP/includes$sep\$IP/languages\" );
1146 require_once( \"includes/DefaultSettings.php\" );
1148 # If PHP's memory limit is very low, some operations may fail.
1149 " . ($conf->raiseMemory ?
'' : '# ' ) . "ini_set( 'memory_limit', '20M' );" . "
1151 if ( \$wgCommandLineMode ) {
1152 if ( isset( \$_SERVER ) && array_key_exists( 'REQUEST_METHOD', \$_SERVER ) ) {
1153 die( \"This script must be run from the command line\\n\" );
1155 } elseif ( empty( \$wgNoOutputBuffer ) ) {
1156 ## Compress output if the browser supports it
1157 {$zlib}if( !ini_get( 'zlib.output_compression' ) ) @ob_start( 'ob_gzhandler' );
1160 \$wgSitename = \"{$slconf['Sitename']}\";
1162 \$wgScriptPath = \"{$slconf['ScriptPath']}\";
1163 \$wgScript = \"\$wgScriptPath/index.php\";
1164 \$wgRedirectScript = \"\$wgScriptPath/redirect.php\";
1166 ## If using PHP as a CGI module, use the ugly URLs
1167 {$pretty}\$wgArticlePath = \"\$wgScript/\$1\";
1168 {$ugly}\$wgArticlePath = \"\$wgScript?title=\$1\";
1170 \$wgStylePath = \"\$wgScriptPath/skins\";
1171 \$wgStyleDirectory = \"\$IP/skins\";
1172 \$wgLogo = \"\$wgStylePath/common/images/wiki.png\";
1174 \$wgUploadPath = \"\$wgScriptPath/images\";
1175 \$wgUploadDirectory = \"\$IP/images\";
1177 \$wgEnableEmail = $enableemail;
1178 \$wgEnableUserEmail = $enableuseremail;
1180 \$wgEmergencyContact = \"{$slconf['EmergencyContact']}\";
1181 \$wgPasswordSender = \"{$slconf['PasswordSender']}\";
1183 ## For a detailed description of the following switches see
1184 ## http://meta.wikimedia.org/Enotif and http://meta.wikimedia.org/Eauthent
1185 ## There are many more options for fine tuning available see
1186 ## /includes/DefaultSettings.php
1187 ## UPO means: this is also a user preference option
1188 \$wgEnotifUserTalk = $enotifusertalk; # UPO
1189 \$wgEnotifWatchlist = $enotifwatchlist; # UPO
1190 \$wgEmailAuthentication = $eauthent;
1192 \$wgDBserver = \"{$slconf['DBserver']}\";
1193 \$wgDBname = \"{$slconf['DBname']}\";
1194 \$wgDBuser = \"{$slconf['DBuser']}\";
1195 \$wgDBpassword = \"{$slconf['DBpassword']}\";
1196 \$wgDBprefix = \"{$slconf['DBprefix']}\";
1197 \$wgDBtype = \"{$slconf['DBtype']}\";
1199 # Experimental charset support for MySQL 4.1/5.0.
1200 \$wgDBmysql5 = {$conf->DBmysql5};
1202 ## Shared memory settings
1203 \$wgMainCacheType = $cacheType;
1204 \$wgMemCachedServers = $mcservers;
1206 ## To enable image uploads, make sure the 'images' directory
1207 ## is writable, then uncomment this:
1208 # \$wgEnableUploads = true;
1209 \$wgUseImageResize = {$conf->UseImageResize};
1210 {$magic}\$wgUseImageMagick = true;
1211 {$magic}\$wgImageMagickConvertCommand = \"{$convert}\";
1213 ## If you want to use image uploads under safe mode,
1214 ## create the directories images/archive, images/thumb and
1215 ## images/temp, and make them all writable. Then uncomment
1216 ## this, if it's not already uncommented:
1217 {$hashedUploads}\$wgHashedUploadDirectory = false;
1219 ## If you have the appropriate support software installed
1220 ## you can enable inline LaTeX equations:
1221 # \$wgUseTeX = true;
1222 \$wgMathPath = \"{\$wgUploadPath}/math\";
1223 \$wgMathDirectory = \"{\$wgUploadDirectory}/math\";
1224 \$wgTmpDirectory = \"{\$wgUploadDirectory}/tmp\";
1226 \$wgLocalInterwiki = \$wgSitename;
1228 \$wgLanguageCode = \"{$slconf['LanguageCode']}\";
1230 \$wgProxyKey = \"$secretKey\";
1232 ## Default skin: you can change the default skin. Use the internal symbolic
1233 ## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook':
1234 # \$wgDefaultSkin = 'monobook';
1236 ## For attaching licensing metadata to pages, and displaying an
1237 ## appropriate copyright notice / icon. GNU Free Documentation
1238 ## License and Creative Commons licenses are supported so far.
1239 {$rights}\$wgEnableCreativeCommonsRdf = true;
1240 \$wgRightsPage = \"\"; # Set to the title of a wiki page that describes your license/copyright
1241 \$wgRightsUrl = \"{$slconf['RightsUrl']}\";
1242 \$wgRightsText = \"{$slconf['RightsText']}\";
1243 \$wgRightsIcon = \"{$slconf['RightsIcon']}\";
1244 # \$wgRightsCode = \"{$slconf['RightsCode']}\"; # Not yet used
1246 \$wgDiff3 = \"{$slconf['diff3']}\";
1248 // Keep things in Unix line endings internally;
1249 // the system will write out as local text type.
1250 return str_replace( "\r\n", "\n", $localsettings );
1253 function dieout( $text ) {
1254 die( $text . "\n\n</body>\n</html>" );
1257 function importVar( &$var, $name, $default = "" ) {
1258 if( isset( $var[$name] ) ) {
1259 $retval = $var[$name];
1260 if ( get_magic_quotes_gpc() ) {
1261 $retval = stripslashes( $retval );
1269 function importPost( $name, $default = "" ) {
1270 return importVar( $_POST, $name, $default );
1273 function importRequest( $name, $default = "" ) {
1274 return importVar( $_REQUEST, $name, $default );
1279 function aField( &$conf, $field, $text, $type = "text", $value = "" ) {
1282 $xtype = "type=\"$type\"";
1287 if(!(isset($id)) or ($id == "") ) $id = $field;
1288 $nolabel = ($type == "radio") ||
($type == "hidden");
1290 if ($type == 'radio')
1291 $id .= $radioCount++
;
1296 echo "\t\t<label class='column' for=\"$id\">$text</label>\n";
1299 if( $type == "radio" && $value == $conf->$field ) {
1300 $checked = "checked='checked'";
1304 echo "\t\t<input $xtype name=\"$field\" id=\"$id\" class=\"iput-$type\" $checked value=\"";
1305 if( $type == "radio" ) {
1306 echo htmlspecialchars( $value );
1308 echo htmlspecialchars( $conf->$field );
1312 echo " $text</label>\n";
1316 if(isset($errs[$field])) echo "<span class='error'>" . $errs[$field] . "</span>\n";
1319 function getLanguageList() {
1320 global $wgLanguageNames;
1321 if( !isset( $wgLanguageNames ) ) {
1322 $wgContLanguageCode = "xxx";
1323 function wfLocalUrl( $x ) { return $x; }
1324 function wfLocalUrlE( $x ) { return $x; }
1325 require_once( "languages/Names.php" );
1330 $d = opendir( "../languages" );
1331 while( false !== ($f = readdir( $d ) ) ) {
1333 if( preg_match( '/Language([A-Z][a-z_]+)\.php$/', $f, $m ) ) {
1334 $code = str_replace( '_', '-', strtolower( $m[1] ) );
1335 if( isset( $wgLanguageNames[$code] ) ) {
1336 $name = $code . ' - ' . $wgLanguageNames[$code];
1340 $codes[$code] = $name;
1348 #Check for location of an executable
1349 # @param string $loc single location to check
1350 # @param array $names filenames to check for.
1351 # @param mixed $versioninfo array of details to use when checking version, use false for no version checking
1352 function locate_executable($loc, $names, $versioninfo = false) {
1353 if (!is_array($names))
1354 $names = array($names);
1356 foreach ($names as $name) {
1357 $command = "$loc".DIRECTORY_SEPARATOR
."$name";
1358 if (file_exists($command)) {
1362 $file = str_replace('$1', $command, $versioninfo[0]);
1363 if (strstr(`
$file`
, $versioninfo[1]) !== false)
1370 function get_db_version() {
1371 global $wgDatabase, $conf;
1372 if ($conf->DBtype
== 'mysql')
1373 return mysql_get_server_info( $wgDatabase->mConn
);
1374 else if ($conf->DBtype
== 'oracle')
1375 return oci_server_version($wgDatabase->mConn
);
1378 # Test a memcached server
1379 function testMemcachedServer( $server ) {
1380 $hostport = explode(":", $server);
1383 if ( !function_exists( 'fsockopen' ) ) {
1384 $errstr = "Can't connect to memcached, fsockopen() not present";
1386 if ( !$errstr && count( $hostport ) != 2 ) {
1387 $errstr = 'Please specify host and port';
1388 var_dump( $hostport );
1391 list( $host, $port ) = $hostport;
1395 $fp = @fsockopen
( $host, $port, $errno, $fsockerr, 1.0 );
1396 if ( $fp === false ) {
1397 $errstr = "Cannot connect to memcached on $host:$port : $fsockerr";
1401 $command = "version\r\n";
1402 $bytes = fwrite( $fp, $command );
1403 if ( $bytes != strlen( $command ) ) {
1404 $errstr = "Cannot write to memcached socket on $host:$port";
1408 $expected = "VERSION ";
1409 $response = fread( $fp, strlen( $expected ) );
1410 if ( $response != $expected ) {
1411 $errstr = "Didn't get correct memcached response from $host:$port";
1418 echo "<li>Connected to memcached on $host:$port successfully";
1424 <div
class="license">
1426 <p
>This program is free software
; you can redistribute it
and/or modify
1427 it under the terms of the GNU General
Public License
as published by
1428 the Free Software Foundation
; either version
2 of the License
, or
1429 (at your option
) any later version
.</p
>
1431 <p
>This program is distributed in the hope that it will be useful
,
1432 but WITHOUT ANY WARRANTY
; without even the implied warranty of
1433 MERCHANTABILITY
or FITNESS
FOR A PARTICULAR PURPOSE
. See the
1434 GNU General
Public License
for more details
.</p
>
1436 <p
>You should have received
<a href
="../COPYING">a copy of the GNU General
Public License
</a
>
1437 along with this program
; if not
, write to the Free Software
1438 Foundation
, Inc
., 59 Temple Place
- Suite
330, Boston
, MA
02111-1307, USA
.
1439 or <a href
="http://www.gnu.org/copyleft/gpl.html">read it online
</a
></p
>
1445 <div id
="column-one">
1446 <div
class="portlet" id
="p-logo">
1447 <a style
="background-image: url(../skins/common/images/mediawiki.png);"
1448 href
="http://www.mediawiki.org/"
1449 title
="Main Page"></a
>
1451 <script type
="text/javascript"> if (window
.isMSIE55
) fixalpha(); </script
>
1452 <div
class='portlet'><div
class='pBody'>
1454 <li
><strong
><a href
="http://www.mediawiki.org/">MediaWiki home
</a
></strong
></li
>
1455 <li
><a href
="../README">Readme
</a
></li
>
1456 <li
><a href
="../RELEASE-NOTES">Release notes
</a
></li
>
1457 <li
><a href
="../docs/">Documentation
</a
></li
>
1458 <li
><a href
="http://meta.wikipedia.org/wiki/MediaWiki_User's_Guide">User
's Guide</a></li>
1459 <li><a href="http://meta.wikimedia.org/wiki/MediaWiki_FAQ">FAQ</a></li>
1461 <p style="font-size:90%;margin-top:1em">MediaWiki is Copyright © 2001-2005 by Magnus Manske, Brion Vibber, Lee Daniel Crocker, Tim Starling, Erik Möller, Gabriel Wicke and others.</p>