From 28e5cab80d4ba825a171c9101255c8d9f99248d7 Mon Sep 17 00:00:00 2001 From: "dorian.hodin" Date: Mon, 6 Mar 2023 11:46:41 +0100 Subject: [PATCH] Try to debug API, find where did the connection failed --- .idea/php.xml | 16 ++++++++++++++++ Source/API/script/Config/ConnectClass.php | 4 ++-- Source/API/script/Gateway/GatewayForm.php | 2 +- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.idea/php.xml b/.idea/php.xml index 7e5d55a..7d11e4f 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -1,4 +1,20 @@ + + + + + + + + + + \ No newline at end of file diff --git a/Source/API/script/Config/ConnectClass.php b/Source/API/script/Config/ConnectClass.php index ad054dc..41f2ea5 100644 --- a/Source/API/script/Config/ConnectClass.php +++ b/Source/API/script/Config/ConnectClass.php @@ -21,9 +21,9 @@ class ConnectClass{ function connect(): int|Connection { try { - echo "OKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK"; + echo $this->dsn." ".$this->login." ".$this->password; $connection = new Connection($this->dsn,$this->login,$this->password); - + echo "OKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK"; }catch (PDOException){ throw new PDOException(); } diff --git a/Source/API/script/Gateway/GatewayForm.php b/Source/API/script/Gateway/GatewayForm.php index def3f1c..d2c6a55 100644 --- a/Source/API/script/Gateway/GatewayForm.php +++ b/Source/API/script/Gateway/GatewayForm.php @@ -14,8 +14,8 @@ class GatewayForm public function __construct() { try{ - echo "ici???"; $this->connection = (new ConnectClass)->connect(); + echo "ici???"; }catch(PDOException){ throw new PDOException(); }