Changeset:
        6072419a3d82
        
https://sourceforge.net/p/mrbs/hg-code/ci/6072419a3d82fc187fabe7c67024081c4b4f9220
Author:
        Campbell Morrison <[email protected]>
Date:
        Thu Sep 29 17:41:01 2016 +0100
Log message:

Added in some more notes for those upgrading from earlier versions of MRBS

diffstat:

 web/lib/MRBS/DB.php |  13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diffs (28 lines):

diff -r e855dcc62b13 -r 6072419a3d82 web/lib/MRBS/DB.php
--- a/web/lib/MRBS/DB.php       Thu Sep 29 17:14:33 2016 +0100
+++ b/web/lib/MRBS/DB.php       Thu Sep 29 17:41:01 2016 +0100
@@ -48,12 +48,23 @@
     catch (PDOException $e)
     {
       $message = $e->getMessage();
-      if ($e->getCode() == 2054)
+      
+      // Add in some possible solutions for common problems when migrating to 
the PDO version of MRBS
+      // from an earlier version.      
+      if ($e->getCode() == 7)
+      {
+        if (($db_host === '') && (static::DB_DBO_DRIVER === 
DB_pgsql::DB_DBO_DRIVER))
+        {
+          $message .= ".\n[MRBS note] Try setting " . '$db_host' . " to 
'127.0.0.1'.";
+        }
+      }
+      elseif ($e->getCode() == 2054)
       {
         $message .= ".\n[MRBS note] It looks like you may 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.";
       }
+      
       throw new DBException($message, 0, $e);
     }
   }

------------------------------------------------------------------------------
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to