瀏覽代碼

Another fix to database.php

svalavuo 7 小時之前
父節點
當前提交
5d6c336b95
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      backend/config/database.php

+ 1 - 1
backend/config/database.php

@@ -75,7 +75,7 @@ class Database {
 
         try {
             $dsn = "mysql:host=" . $this->host . ";dbname=" . $this->db_name . ";charset=utf8mb4";
-            $connectionType = $localSocketExists ? "external (local socket failed)" : "external";
+            $connectionType = $isDockerEnvironment ? "external (Docker environment)" : "external";
             error_log("Attempting $connectionType database connection: $dsn with user " . $this->username);
             $this->conn = new PDO($dsn, $this->username, $this->password);
             $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);