Changeset:
        0f7b141a8228
        
https://sourceforge.net/p/mrbs/hg-code/ci/0f7b141a8228c6bcb21d4a1a120586890eff8bca
Author:
        Campbell Morrison <cimorri...@hg.code.sf.net>
Date:
        Tue Sep 20 15:25:21 2016 +0100
Log message:

Added some error handling for the case when PDO encounters old style MySQL 
passwords.

diffstat:

 web/mysqli.inc |  7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diffs (17 lines):

diff -r 43da4a3a5e46 -r 0f7b141a8228 web/mysqli.inc
--- a/web/mysqli.inc    Mon Sep 19 08:08:23 2016 +0100
+++ b/web/mysqli.inc    Tue Sep 20 15:25:21 2016 +0100
@@ -585,6 +585,13 @@
   catch (PDOException $e)
   {
     trigger_error($e->getMessage(), E_USER_WARNING);
+    if ($e->getCode() == 2054)
+    {
+      $message = "It looks like you have an old style MySQL password stored, 
which cannot be " .
+                 "used with PDO (though it is possible that mysqli may have 
accepted it).  Try " .
+                 "deleting the MySQL user and recreating it with the same 
password.";
+      trigger_error($message, E_USER_WARNING);
+    }
     echo "\n<p>\n" . get_vocab("failed_connect_db") . "\n</p>\n";
     exit;
   }

------------------------------------------------------------------------------
_______________________________________________
Mrbs-commits mailing list
Mrbs-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to