소스 검색

Another fix to database.php

svalavuo 10 시간 전
부모
커밋
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);