From fd12989ef8eab0fc9816decb8bcabccd1d213ee8 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 18 Jul 2007 09:49:48 +0200 Subject: auf 1.10.1 aktualisiert --- config/index.php | 90 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 46 insertions(+), 44 deletions(-) (limited to 'config') diff --git a/config/index.php b/config/index.php index d036e8c8..e719e47e 100644 --- a/config/index.php +++ b/config/index.php @@ -395,7 +395,8 @@ if( !function_exists( 'session_name' ) ) # session.save_path doesn't *have* to be set, but if it is, and it's # not valid/writable/etc. then it can cause problems -$sessionSavePath = ini_get( 'session.save_path' ); +$sessionSavePath = mw_get_session_save_path(); +$ssp = htmlspecialchars( $sessionSavePath ); # Warn the user if it's not set, but let them proceed if( !$sessionSavePath ) { print "
  • Warning: A value for session.save_path @@ -404,14 +405,12 @@ if( !$sessionSavePath ) { for the user your web server is running under.
  • "; } elseif ( is_dir( $sessionSavePath ) && is_writable( $sessionSavePath ) ) { # All good? Let the user know - print "
  • Session save path appears to be valid.
  • "; + print "
  • Session save path ({$ssp}) appears to be valid.
  • "; } else { - # Something not right? Halt the installation so the user can fix it up - dieout( "Your session save path appears to be invalid or is not writable. - PHP needs to be able to save data to this location in order for correct - session operation. Please check that session.save_path in - PHP.ini points to a valid path, and is read/write/execute for - the user your web server is running under." ); + # Something not right? Warn the user, but let them proceed + print "
  • Warning: Your session.save_path value ({$ssp}) + appears to be invalid or is not writable. PHP needs to be able to save data to + this location for correct session operation.
  • "; } # Check for PCRE support @@ -839,45 +838,48 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) { if( $wgDatabase->tableExists( "cur" ) || $wgDatabase->tableExists( "revision" ) ) { print "
  • There are already MediaWiki tables in this database. Checking if updates are needed...
  • \n"; - # Determine existing default character set - if ( $wgDatabase->tableExists( "revision" ) ) { - $revision = $wgDatabase->escapeLike( $conf->DBprefix . 'revision' ); - $res = $wgDatabase->query( "SHOW TABLE STATUS LIKE '$revision'" ); - $row = $wgDatabase->fetchObject( $res ); - if ( !$row ) { - echo "
  • SHOW TABLE STATUS query failed!
  • \n"; - $existingSchema = false; - } elseif ( preg_match( '/^latin1/', $row->Collation ) ) { - $existingSchema = 'mysql4'; - } elseif ( preg_match( '/^utf8/', $row->Collation ) ) { - $existingSchema = 'mysql5'; - } elseif ( preg_match( '/^binary/', $row->Collation ) ) { - $existingSchema = 'mysql5-binary'; - } else { - $existingSchema = false; - echo "
  • Warning: Unrecognised existing collation
  • \n"; - } - if ( $existingSchema && $existingSchema != $conf->DBschema ) { - print "
  • Warning: you requested the {$conf->DBschema} schema, " . - "but the existing database has the $existingSchema schema. This upgrade script ". - "can't convert it, so it will remain $existingSchema.
  • \n"; - $conf->setSchema( $existingSchema ); + if ( $conf->DBtype == 'mysql') { + + # Determine existing default character set + if ( $wgDatabase->tableExists( "revision" ) ) { + $revision = $wgDatabase->escapeLike( $conf->DBprefix . 'revision' ); + $res = $wgDatabase->query( "SHOW TABLE STATUS LIKE '$revision'" ); + $row = $wgDatabase->fetchObject( $res ); + if ( !$row ) { + echo "
  • SHOW TABLE STATUS query failed!
  • \n"; + $existingSchema = false; + } elseif ( preg_match( '/^latin1/', $row->Collation ) ) { + $existingSchema = 'mysql4'; + } elseif ( preg_match( '/^utf8/', $row->Collation ) ) { + $existingSchema = 'mysql5'; + } elseif ( preg_match( '/^binary/', $row->Collation ) ) { + $existingSchema = 'mysql5-binary'; + } else { + $existingSchema = false; + echo "
  • Warning: Unrecognised existing collation
  • \n"; + } + if ( $existingSchema && $existingSchema != $conf->DBschema ) { + print "
  • Warning: you requested the {$conf->DBschema} schema, " . + "but the existing database has the $existingSchema schema. This upgrade script ". + "can't convert it, so it will remain $existingSchema.
  • \n"; + $conf->setSchema( $existingSchema ); + } } - } - # Create user if required (todo: other databases) - if ( $conf->Root && $conf->DBtype == 'mysql') { - $conn = $dbc->newFromParams( $wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname, 1 ); - if ( $conn->isOpen() ) { - print "
  • DB user account ok
  • \n"; - $conn->close(); - } else { - print "
  • Granting user permissions..."; - if( $mysqlOldClient && $mysqlNewAuth ) { - print " If the next step fails, see http://dev.mysql.com/doc/mysql/en/old-client.html for help."; + # Create user if required + if ( $conf->Root ) { + $conn = $dbc->newFromParams( $wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname, 1 ); + if ( $conn->isOpen() ) { + print "
  • DB user account ok
  • \n"; + $conn->close(); + } else { + print "
  • Granting user permissions..."; + if( $mysqlOldClient && $mysqlNewAuth ) { + print " If the next step fails, see http://dev.mysql.com/doc/mysql/en/old-client.html for help."; + } + print "
  • \n"; + dbsource( "../maintenance/users.sql", $wgDatabase ); } - print "\n"; - dbsource( "../maintenance/users.sql", $wgDatabase ); } } print "
    \n";
    -- 
    cgit v1.2.2