Wedge

Public area => Bug reports => The Pub => Archived fixes => Topic started by: Dragooon on June 16th, 2013, 08:06 AM

Title: MySQL version detection broken on installation
Post by: Dragooon on June 16th, 2013, 08:06 AM
This caused me to uproot my localhost :lol:

Fix:
Code: [Select]
Index: root/install.php
===================================================================
--- root/install.php (revision 2166)
+++ root/install.php (working copy)
@@ -772,7 +772,7 @@
  }
 
  // Do they meet the install requirements?
- if ((version_compare($db['required_client'], preg_replace('~^\D*|\-.+?$~', '', mysqli_get_client_info())) > 0) || (version_compare($db['required_server'], preg_replace('~^\D*|\-.+?$~', '', mysqli_get_server_info())) > 0))
+ if ((version_compare($db['required_client'], preg_replace('~^\D*|\-.+?$~', '', mysqli_get_client_info())) > 0) || (version_compare($db['required_server'], preg_replace('~^\D*|\-.+?$~', '', mysqli_get_server_info($db_connection))) > 0))
  {
  $incontext['error'] = sprintf($txt['error_db_too_low'], 'Server: ' . mysqli_get_server_info() . ' / Client: ' . mysqli_get_client_info());
  return false;
Title: Re: MySQL version detection broken on installation
Post by: Arantor on June 16th, 2013, 12:22 PM
Oops, sorry about that!

Also, @Nao: flexbox type bug - I can't use the horizontal scrollbar in Chrome for the above code block. The only way I can scroll across is to select the text and drag it that way. Chrome 28 here.
Title: Re: MySQL version detection broken on installation
Post by: Arantor on August 1st, 2013, 04:48 AM
Fixed locally, will add in next commit, thanks.

Also note that the above reported issue of scrollbars is not an issue in Chrome 29.