* (bug 650) Prominently link MySQL 4.1 help page in installer if a possible
authorBrion Vibber <brion@users.mediawiki.org>
Sun, 12 Jun 2005 12:42:27 +0000 (12:42 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sun, 12 Jun 2005 12:42:27 +0000 (12:42 +0000)
  version conflict is detected

RELEASE-NOTES
config/index.php

index 9f38cad..c5cf73f 100644 (file)
@@ -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 ===
index 9600f00..74349e4 100644 (file)
@@ -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 "<li><b>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 <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></li>\n";
+               }
                print "<li>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 "; <b class='error'>You are using MySQL 4.1 server, but PHP is linked
+                               to old client libraries; if you have trouble with authentication, 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>";
+               }
                print "</li>\n";
 
                @$sel = mysql_select_db( $wgDBname, $wgDatabase->mConn );
@@ -548,7 +562,11 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) {
                                        print "<li>DB user account ok</li>\n";
                                        $conn->close();
                                } else {
-                                       print "<li>Granting user permissions...</li>\n";
+                                       print "<li>Granting user permissions...";
+                                       if( $mysqlOldClient && $mysqlNewAuth ) {
+                                               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>";
+                                       }
+                                       print "</li>\n";
                                        dbsource( "../maintenance/users.sql", $wgDatabase );
                                }
                        }