PDOException Object ( [message:protected] => SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) [string:Exception:private] => [code:protected] => 1045 [file:protected] => /home/www/data/cmssites/cegchem.com/DB.php [line:protected] => 16 [trace:Exception:private] => Array ( [0] => Array ( [file] => /home/www/data/cmssites/cegchem.com/DB.php [line] => 16 [function] => __construct [class] => PDO [type] => -> [args] => Array ( [0] => mysql:host=127.0.0.1;dbname=cms_site [1] => root [2] => w$65498agwe46! ) ) [1] => Array ( [file] => /home/www/data/cmssites/cegchem.com/detail.php [line] => 25 [function] => __construct [class] => DB [type] => -> [args] => Array ( [0] => Array ( [database] => cms_site [username] => root [password] => w$65498agwe46! [port] => 3306 [host] => 127.0.0.1 ) ) ) ) [previous:Exception:private] => [errorInfo] => )
Fatal error: Uncaught Error: Call to a member function prepare() on null in /home/www/data/cmssites/cegchem.com/DB.php:62 Stack trace: #0 /home/www/data/cmssites/cegchem.com/detail.php(27): DB->getNewsById(5196) #1 {main} thrown in /home/www/data/cmssites/cegchem.com/DB.php on line 62