}
print "</li>\n";
+if( ini_get( "register_globals" ) ) {
+ ?>
+ <li><b class='error'>Warning:</b> <b>PHP's
+ <tt><a href="http://php.net/register_globals">register_globals</a></tt>
+ option is enabled.</b> MediaWiki will work correctly, but this setting
+ increases your exposure to potential security vulnerabilities in PHP-based
+ software running on your server. <b>You should disable it if you are able.</b></li>
+ <?php
+}
+
if( ini_get( "safe_mode" ) ) {
?>
<li class='error'><b>Warning: PHP's
if( $conf->xml ) {
print "<li>Have XML / Latin1-UTF-8 conversion support.</li>\n";
} else {
- print "<li><b>XML / Latin1-UTF-8 conversion is missing! Wiki will probably not work.</b></li>\n";
+ dieout( "PHP's XML module is missing; the wiki requires functions in
+ this module and won't work in this configuration.
+ If you're running Mandrake, install the php-xml package." );
}
$memlimit = ini_get( "memory_limit" );
if( $conf->Sitename == "" || $conf->Sitename == "MediaWiki" || $conf->Sitename == "Mediawiki" ) {
$errs["Sitename"] = "Must not be blank or \"MediaWiki\".";
}
+if( $conf->DBuser == "" ) {
+ $errs["DBuser"] = "Must not be blank";
+}
if( $conf->DBpassword == "" ) {
$errs["DBpassword"] = "Must not be blank";
}
do_objectcache_update(); flush();
do_categorylinks_update(); flush();
do_image_name_unique_update(); flush();
+ do_logging_update(); flush();
+ do_user_rights_update(); flush();
if ( isTemplateInitialised() ) {
print "Template namespace already initialised\n";
$ugly = ($conf->prettyURLs ? "# " : "");
$rights = ($conf->RightsUrl) ? "" : "# ";
- $file = @fopen( "/dev/random", "r" );
+ $file = @fopen( "/dev/urandom", "r" );
if ( $file ) {
$proxyKey = bin2hex( fread( $file, 32 ) );
fclose( $file );
# Add slashes to strings for double quoting
$slconf = array_map( "escapePhpString", get_object_vars( $conf ) );
-
+ if( $conf->License == 'gfdl' ) {
+ # Needs literal string interpolation for the current style path
+ $slconf['RightsIcon'] = $conf->RightsIcon;
+ }
$sep = (DIRECTORY_SEPARATOR == "\\") ? ";" : ":";
return "
}
} elseif ( empty( \$wgConfiguring ) ) {
## Compress output if the browser supports it
- {$zlib}if( !ini_get( 'zlib.output_compression' ) ) ob_start( 'ob_gzhandler' );
+ {$zlib}if( !ini_get( 'zlib.output_compression' ) ) @ob_start( 'ob_gzhandler' );
}
\$wgSitename = \"{$slconf['Sitename']}\";
## License and Creative Commons licenses are supported so far.
{$rights}\$wgEnableCreativeCommonsRdf = true;
\$wgRightsPage = \"\"; # Set to the title of a wiki page that describes your license/copyright
-\$wgRightsUrl = \"{$conf->RightsUrl}\";
-\$wgRightsText = \"{$conf->RightsText}\";
-\$wgRightsIcon = \"{$conf->RightsIcon}\";
-# \$wgRightsCode = \"{$conf->RightsCode}\"; # Not yet used
+\$wgRightsUrl = \"{$slconf['RightsUrl']}\";
+\$wgRightsText = \"{$slconf['RightsText']}\";
+\$wgRightsIcon = \"{$slconf['RightsIcon']}\";
+# \$wgRightsCode = \"{$slconf['RightsCode']}\"; # Not yet used
";
}