From 9251fca0b15b30d9b8f99336dd6712cdb4cd255e Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sun, 12 Jun 2005 12:42:27 +0000 Subject: [PATCH] * (bug 650) Prominently link MySQL 4.1 help page in installer if a possible version conflict is detected --- RELEASE-NOTES | 2 ++ config/index.php | 20 +++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 9f38cad028..c5cf73ffb3 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -277,6 +277,8 @@ Various bugfixes, small features, and a few experimental things: * (bug 2367) Insert correct redirect link record on page move * (bug 2372) Fix rendering of empty-title inline interwiki links * (bug 2384) Fix typo in regex for IP address checking +* (bug 650) Prominently link MySQL 4.1 help page in installer if a possible + version conflict is detected === Caveats === diff --git a/config/index.php b/config/index.php index 9600f003d0..74349e4a6e 100644 --- a/config/index.php +++ b/config/index.php @@ -448,6 +448,13 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) { require_once( "maintenance/InitialiseMessages.inc" ); $wgTitle = Title::newFromText( "Installation script" ); + $mysqlOldClient = version_compare( mysql_get_client_info(), "4.1.0", "lt" ); + if( $mysqlOldClient ) { + print "
  • PHP is linked with old MySQL client libraries. If you are + using a MySQL 4.1 server and have problems connecting to the database, + see http://dev.mysql.com/doc/mysql/en/old-client.html for help.
  • \n"; + } print "
  • Trying to connect to MySQL on $wgDBserver as root...\n"; $wgDatabase = Database::newFromParams( $wgDBserver, "root", $conf->RootPW, "", 1 ); @@ -513,6 +520,13 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) { $conf->DBmysql4 = true; $local = writeLocalSettings( $conf ); } + $mysqlNewAuth = version_compare( $myver, "4.1.0", "ge" ); + if( $mysqlNewAuth && $mysqlOldClient ) { + print "; You are using MySQL 4.1 server, but PHP is linked + to old client libraries; if you have trouble with authentication, see + http://dev.mysql.com/doc/mysql/en/old-client.html for help."; + } print "
  • \n"; @$sel = mysql_select_db( $wgDBname, $wgDatabase->mConn ); @@ -548,7 +562,11 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) { print "
  • DB user account ok
  • \n"; $conn->close(); } else { - print "
  • Granting user permissions...
  • \n"; + 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 ); } } -- 2.20.1