From 62bfb4d77f8c7701ea08ac41d33b88f33c054d2e Mon Sep 17 00:00:00 2001 From: solocla Date: Thu, 10 Sep 2026 10:18:47 +0200 Subject: [PATCH] fixed 2 connections --- Connections/cmctrfdb.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Connections/cmctrfdb.php b/Connections/cmctrfdb.php index 873481b..3e31836 100644 --- a/Connections/cmctrfdb.php +++ b/Connections/cmctrfdb.php @@ -3,17 +3,17 @@ # Type="MYSQL" # HTTP="true" -require_once __DIR__ . '/../../vendor/autoload.php'; +require_once __DIR__ . '/../vendor/autoload.php'; if (!isset($_ENV['DB_HOST'])) { - $dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . '/../../'); + $dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . '/../'); $dotenv->safeLoad(); } -$hostname_cmctrfdb = $_ENV['DB_HOST']; -$database_cmctrfdb = $_ENV['DB_DATABASE']; -$username_cmctrfdb = $_ENV['DB_USERNAME']; -$password_cmctrfdb = $_ENV['DB_PASSWORD']; +$hostname_cmctrfdb = $_ENV['DB_HOST'] ?? 'localhost'; +$database_cmctrfdb = $_ENV['DB_DATABASE'] ?? ''; +$username_cmctrfdb = $_ENV['DB_USERNAME'] ?? ''; +$password_cmctrfdb = $_ENV['DB_PASSWORD'] ?? ''; $servername = $hostname_cmctrfdb; $username = $username_cmctrfdb;