I have db
class that nearly all classes are extending:
class db {
protected $db;
public function __construct() {
$this->connect();
}
protected function connect() {
$this->db = new MySQLi(db_host, db_user, db_pass, db_name) or die($this->db->error); (line 22)
$this->db->set_charset('utf8');
}
}
Here is page class
class page extends db {
var $common;
public function __construct() {
parent::__construct();
$this->common = new common();
And
class common extends db {
public function __construct() {
parent::__construct();
}
I'm getting
Warning: mysqli::mysqli() [mysqli.mysqli]: (42000/1203): User admin already has more than 'max_user_connections' active connections in /home/tural/public_html/incl/classes/class.db.php on line 22
How can I fix this problem?