Error: count(): Parameter must be an array or an object that implements Countable (2): /var/www/vhosts/obive.net/httpdocs/chronicle/lib/lib.php:38

Exception:SQLSTATE[HY000] [2002] No such file or directory

object(PDOException)#2 (8) {
  ["message":protected]=>
  string(48) "SQLSTATE[HY000] [2002] No such file or directory"
  ["string":"Exception":private]=>
  string(0) ""
  ["code":protected]=>
  int(2002)
  ["file":protected]=>
  string(55) "/var/www/vhosts/obive.net/httpdocs/chronicle/lib/db.php"
  ["line":protected]=>
  int(20)
  ["trace":"Exception":private]=>
  array(2) {
    [0]=>
    array(5) {
      ["file"]=>
      string(55) "/var/www/vhosts/obive.net/httpdocs/chronicle/lib/db.php"
      ["line"]=>
      int(20)
      ["function"]=>
      string(11) "__construct"
      ["class"]=>
      string(3) "PDO"
      ["type"]=>
      string(2) "->"
    }
    [1]=>
    array(4) {
      ["file"]=>
      string(54) "/var/www/vhosts/obive.net/httpdocs/chronicle/index.php"
      ["line"]=>
      int(6)
      ["args"]=>
      array(1) {
        [0]=>
        string(55) "/var/www/vhosts/obive.net/httpdocs/chronicle/lib/db.php"
      }
      ["function"]=>
      string(12) "include_once"
    }
  }
  ["previous":"Exception":private]=>
  NULL
  ["errorInfo"]=>
  NULL
}

Exception:Call to a member function prepare() on null

object(Error)#1 (7) {
  ["message":protected]=>
  string(43) "Call to a member function prepare() on null"
  ["string":"Error":private]=>
  string(0) ""
  ["code":protected]=>
  int(0)
  ["file":protected]=>
  string(55) "/var/www/vhosts/obive.net/httpdocs/chronicle/lib/db.php"
  ["line":protected]=>
  int(69)
  ["trace":"Error":private]=>
  array(2) {
    [0]=>
    array(3) {
      ["file"]=>
      string(56) "/var/www/vhosts/obive.net/httpdocs/chronicle/journal.php"
      ["line"]=>
      int(62)
      ["function"]=>
      string(22) "getDbResultsWithParams"
    }
    [1]=>
    array(4) {
      ["file"]=>
      string(54) "/var/www/vhosts/obive.net/httpdocs/chronicle/index.php"
      ["line"]=>
      int(86)
      ["args"]=>
      array(1) {
        [0]=>
        string(56) "/var/www/vhosts/obive.net/httpdocs/chronicle/journal.php"
      }
      ["function"]=>
      string(7) "include"
    }
  }
  ["previous":"Error":private]=>
  NULL
}