From ad66fe3285c52c03cba9775754df279b8e6f30f5 Mon Sep 17 00:00:00 2001 From: Matteo Gheza Date: Fri, 5 Jun 2020 21:03:13 +0200 Subject: [PATCH] Docker setup is now working!! --- docker-compose.yaml | 1 + server/core.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 7655f11..d4e9c7b 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -3,6 +3,7 @@ version: '3.3' services: db: image: mariadb:latest + command: --default-authentication-plugin=mysql_native_password volumes: - db_data:/var/lib/mysql restart: always diff --git a/server/core.php b/server/core.php index d8656c0..293663f 100644 --- a/server/core.php +++ b/server/core.php @@ -162,7 +162,7 @@ class database{ } public function isOptionsEmpty(){ - return empty($this->database->exec("SELECT * FROM `%PREFIX%_options`;", true)); + return empty($this->exec("SELECT * FROM `%PREFIX%_options`;", true)); } public function __construct(){ @@ -170,7 +170,7 @@ class database{ define("DATABASE", "OK"); } $this->connect(); - if($this->isOptionsEmpty){ + if($this->isOptionsEmpty()){ header('Location: install/install.php'); } }