object(PDOException)#4 (8) { ["message":protected]=> string(41) "SQLSTATE[HY000] [2002] Connection refused" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(2002) ["file":protected]=> string(37) "/var/www/html/models/productModel.php" ["line":protected]=> int(134) ["trace":"Exception":private]=> array(4) { [0]=> array(6) { ["file"]=> string(37) "/var/www/html/models/productModel.php" ["line"]=> int(134) ["function"]=> string(11) "__construct" ["class"]=> string(3) "PDO" ["type"]=> string(2) "->" ["args"]=> array(3) { [0]=> string(37) "mysql:host=mysql;dbname=anjou-loc-dev" [1]=> string(9) "honorance" [2]=> string(20) "o7Z2mzEG3&61nq8e7RkN" } } [1]=> array(6) { ["file"]=> string(47) "/var/www/html/controllers/productController.php" ["line"]=> int(33) ["function"]=> string(10) "selectById" ["class"]=> string(12) "productModel" ["type"]=> string(2) "->" ["args"]=> array(1) { [0]=> int(144) } } [2]=> array(6) { ["file"]=> string(38) "/var/www/html/views/productdetails.php" ["line"]=> int(11) ["function"]=> string(11) "productById" ["class"]=> string(17) "productController" ["type"]=> string(2) "->" ["args"]=> array(1) { [0]=> string(3) "144" } } [3]=> array(4) { ["file"]=> string(23) "/var/www/html/index.php" ["line"]=> int(11) ["args"]=> array(1) { [0]=> string(38) "/var/www/html/views/productdetails.php" } ["function"]=> string(7) "include" } } ["previous":"Exception":private]=> NULL ["errorInfo"]=> array(3) { [0]=> string(5) "HY000" [1]=> int(2002) [2]=> string(18) "Connection refused" } } object(PDOException)#5 (8) { ["message":protected]=> string(41) "SQLSTATE[HY000] [2002] Connection refused" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(2002) ["file":protected]=> string(38) "/var/www/html/models/categoryModel.php" ["line":protected]=> int(70) ["trace":"Exception":private]=> array(4) { [0]=> array(6) { ["file"]=> string(38) "/var/www/html/models/categoryModel.php" ["line"]=> int(70) ["function"]=> string(11) "__construct" ["class"]=> string(3) "PDO" ["type"]=> string(2) "->" ["args"]=> array(3) { [0]=> string(37) "mysql:host=mysql;dbname=anjou-loc-dev" [1]=> string(9) "honorance" [2]=> string(20) "o7Z2mzEG3&61nq8e7RkN" } } [1]=> array(6) { ["file"]=> string(48) "/var/www/html/controllers/categoryController.php" ["line"]=> int(8) ["function"]=> string(6) "select" ["class"]=> string(13) "categoryModel" ["type"]=> string(2) "->" ["args"]=> array(0) { } } [2]=> array(6) { ["file"]=> string(38) "/var/www/html/views/productdetails.php" ["line"]=> int(14) ["function"]=> string(13) "getCategories" ["class"]=> string(18) "categoryController" ["type"]=> string(2) "->" ["args"]=> array(0) { } } [3]=> array(4) { ["file"]=> string(23) "/var/www/html/index.php" ["line"]=> int(11) ["args"]=> array(1) { [0]=> string(38) "/var/www/html/views/productdetails.php" } ["function"]=> string(7) "include" } } ["previous":"Exception":private]=> NULL ["errorInfo"]=> array(3) { [0]=> string(5) "HY000" [1]=> int(2002) [2]=> string(18) "Connection refused" } }


Fatal error: Uncaught Error: Call to a member function getName() on null in /var/www/html/views/productdetails.php:19 Stack trace: #0 /var/www/html/index.php(11): include() #1 {main} thrown in /var/www/html/views/productdetails.php on line 19