omidh Posted September 27, 2011 Share Posted September 27, 2011 Hi I'm start my website three days ago but today when i browse my website i get this error : Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[00000] [1040] Too many connections' in /hermes/bosweb/web126/b1264/*/inc/Connection.class.php:20 Stack trace: #0 /hermes/bosweb/web126/b1264/*/inc/Connection.class.php(20): PDO->__construct('mysql:host=game...', '***', '***') #1 /hermes/bosweb/web126/b1264/*/inc/Connection.class.php(16): connection->stablish_connection() #2 /hermes/bosweb/web126/b1264/*/inc/init.php(6): connection->__construct() #3 /hermes/bosweb/web126/b1264/*/inc/header.php(1): include_once('/hermes/bosweb/...') #4 /hermes/bosweb/web126/b1264/*/index.php(2): include('/hermes/bosweb/...') #5 {main} thrown in /hermes/bosweb/web126/b1264/*/inc/Connection.class.php on line 20 I'm didn't make this script and i can't find who make it, when i contact my support, they said "we don't support PDO" but i'm wonder how it works before this is Connection.class.php: <?php class connection { public $cnn; private $hostname; private $DBName; private $username; private $password; function __construct() { $this->hostname="***.ipagemysql.com"; $this->DBName="gm_*1"; $this->username="gm_*2"; $this->password="gm_*3"; $this->stablish_connection(); } function stablish_connection() { $this->cnn = new PDO("mysql:host=$this->hostname;dbname=$this->DBName", $this->username, $this->password); $this->cnn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } } ?> Please help me to debug this Thanks Link to comment https://forums.phpfreaks.com/topic/247937-pdoexcepction/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.