- The web interface has connected to the database, but could not find any tables generated by LiteBans.
+ The web interface has connected to the database, but could not find the tables generated by LiteBans.
This means that the plugin has not successfully connected to this database before with the same
configuration.
@@ -29,6 +29,7 @@
"driver: H2" with
"driver: MySQL")
host;
if ($host === "localhost" || $host === "127.0.0.1" || $host === "0.0.0.0") {
@@ -40,6 +41,26 @@
- Ensure that you are using the latest version of LiteBans.
+ Database tables:");
+ $db = new Database($settings, true, true);
+ try {
+ $st = $db->conn->query("SELECT * FROM " . $settings->table['bans'] . " LIMIT 1;");
+ $st->fetch();
+ $st->closeCursor();
+ } catch (PDOException $e) {
+ $st = $db->conn->query("SHOW TABLES;");
+ $st->execute();
+ $rows = $st->fetchAll(PDO::FETCH_ASSOC);
+
+ foreach ($rows as $row) {
+ foreach ($row as $k => $v) {
+ echo("
- $v");
+ }
+ }
+ $st->closeCursor();
+ }
+ ?>