MediaWiki Installation
Setup has completed, your wiki is configured.Please delete the /config directory for extra security.
, 2006 Rob Church Please delete the /config directory for extra security. In order to configure the wiki you have to make the config subdirectory
writable by the web server. Once configuration is done you'll move the created
LocalSettings.php to the parent directory, and for added safety you can
then remove the config subdirectory entirely. To make the directory writable on a Unix/Linux system: Please include all of the lines below when reporting installation problems. Cannot install MediaWiki. Generating configuration file... Creating LocalSettings.php... 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... Here's the file that would have been written, try to paste it into place manually: An error occured while writing the config/LocalSettings.php file. Check user rights and disk space then try again. Something's not quite right yet; make sure everything below is filled out correctly.MediaWiki Installation
Setup has completed, your wiki is configured.
Can't write config file, aborting
cd /path/to/wiki
chmod a+w config
" );
}
require_once( "install-utils.inc" );
require_once( "maintenance/updaters.inc" );
class ConfigData {
function getEncoded( $data ) {
# removing latin1 support, no need...
return $data;
}
function getSitename() { return $this->getEncoded( $this->Sitename ); }
function getSysopName() { return $this->getEncoded( $this->SysopName ); }
function getSysopPass() { return $this->getEncoded( $this->SysopPass ); }
}
?>
Checking environment...
PHP " . phpversion() . " installed\n";
if( ini_get( "register_globals" ) ) {
?>
" . htmlspecialchars( $local ) . "
\n";
$wgCommandLineMode = false;
chdir( ".." );
eval($local);
if (!in_array($conf->DBtype, array("mysql", "oracle"))) {
$errs["DBtype"] = "Unknown database type.";
continue;
}
print "
";
continue;
}
$res = $wgDatabase->query( "CREATE DATABASE `$wgDBname`" );
if( !$res ) {
print "\n";
chdir( ".." );
flush();
do_all_updates();
chdir( "config" );
print "
\n";
print "";
initialiseMessages();
print "
\n" . htmlspecialchars( $localSettings ) . "
\n" );
}
if(fwrite( $f, $localSettings ) ) {
fclose( $f );
writeSuccessMessage();
} else {
fclose( $f );
die("
To complete the installation, please do the following:
If you are in a shared hosting environment, do not just move LocalSettings.php remotely. LocalSettings.php is currently owned by the user your webserver is running under, which means that anyone on the same server can read your database password! Downloading it and uploading it again will hopefully change the ownership to a user ID specific to you.
EOT; } else { echo "Installation successful! Move the config/LocalSettings.php file into the parent directory, then follow this link to your wiki.
\n"; } } function escapePhpString( $string ) { return strtr( $string, array( "\n" => "\\n", "\r" => "\\r", "\t" => "\\t", "\\" => "\\\\", "\$" => "\\\$", "\"" => "\\\"" )); } function writeLocalSettings( $conf ) { $conf->UseImageResize = $conf->UseImageResize ? 'true' : 'false'; $conf->PasswordSender = $conf->EmergencyContact; $zlib = ($conf->zlib ? "" : "# "); $magic = ($conf->ImageMagick ? "" : "# "); $convert = ($conf->ImageMagick ? $conf->ImageMagick : "/usr/bin/convert" ); $pretty = ($conf->prettyURLs ? "" : "# "); $ugly = ($conf->prettyURLs ? "# " : ""); $rights = ($conf->RightsUrl) ? "" : "# "; $hashedUploads = $conf->safeMode ? '' : '# '; switch ( $conf->Shm ) { case 'memcached': $cacheType = 'CACHE_MEMCACHED'; $mcservers = var_export( $conf->MCServerArray, true ); break; case 'turck': case 'eaccel': $cacheType = 'CACHE_ACCEL'; $mcservers = 'array()'; break; default: $cacheType = 'CACHE_NONE'; $mcservers = 'array()'; } if ( $conf->Email == 'email_enabled' ) { $enableemail = 'true'; $enableuseremail = ( $conf->Emailuser == 'emailuser_enabled' ) ? 'true' : 'false' ; $eauthent = ( $conf->Eauthent == 'eauthent_enabled' ) ? 'true' : 'false' ; switch ( $conf->Enotif ) { case 'enotif_usertalk': $enotifusertalk = 'true'; $enotifwatchlist = 'false'; break; case 'enotif_allpages': $enotifusertalk = 'true'; $enotifwatchlist = 'true'; break; default: $enotifusertalk = 'false'; $enotifwatchlist = 'false'; } } else { $enableuseremail = 'false'; $enableemail = 'false'; $eauthent = 'false'; $enotifusertalk = 'false'; $enotifwatchlist = 'false'; } $file = @fopen( "/dev/urandom", "r" ); if ( $file ) { $secretKey = bin2hex( fread( $file, 32 ) ); fclose( $file ); } else { $secretKey = ""; for ( $i=0; $i<8; $i++ ) { $secretKey .= dechex(mt_rand(0, 0x7fffffff)); } print "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. or read it online
MediaWiki is Copyright © 2001-2006 by Magnus Manske, Brion Vibber, Lee Daniel Crocker, Tim Starling, Erik Möller, Gabriel Wicke and others.