TDbException

Description

TDbConnection failed to establish DB connection: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)

Source File

/home/vhcs2/www/virtual/designmatch.cz/2008/htdocs/prado311/Data/TDbConnection.php (166)

0155:         if($this->_pdo===null)
0156:         {
0157:             try
0158:             {
0159:                 $this->_pdo=new PDO($this->getConnectionString(),$this->getUsername(),
0160:                                     $this->getPassword(),$this->_attributes);
0161:                 $this->_pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
0162:                 $this->_active=true;
0163:             }
0164:             catch(PDOException $e)
0165:             {
0166: throw new TDbException('dbconnection_open_failed',$e->getMessage());
0167: } 0168: } 0169: } 0170: 0171: /** 0172: * Closes the currently active DB connection. 0173: * It does nothing if the connection is already closed. 0174: */ 0175: protected function close() 0176: { 0177: $this->_pdo=null; 0178: $this->_active=false;

Stack Trace

#0 /home/vhcs2/www/virtual/designmatch.cz/2008/htdocs/prado311/Data/TDbConnection.php(143): TDbConnection->open()
#1 /home/vhcs2/www/virtual/designmatch.cz/2008/htdocs/prado311/TComponent.php(135): TDbConnection->setActive(true)
#2 /home/vhcs2/www/virtual/designmatch.cz/2008/htdocs/protected/lib/TUTF8ActiveRecordConfig.php(19): TComponent->__set('Active', true)
#3 /home/vhcs2/www/virtual/designmatch.cz/2008/htdocs/prado311/TApplication.php(880): TUTF8ActiveRecordConfig->init(Object(TXmlElement))
#4 /home/vhcs2/www/virtual/designmatch.cz/2008/htdocs/prado311/TApplication.php(927): TApplication->applyConfiguration(Object(TApplicationConfiguration), false)
#5 /home/vhcs2/www/virtual/designmatch.cz/2008/htdocs/prado311/TApplication.php(364): TApplication->initApplication()
#6 /home/vhcs2/www/virtual/designmatch.cz/2008/htdocs/index.php(32): TApplication->run()
#7 {main}
2014-12-21 00:44 Apache/2.0.54 (Debian GNU/Linux) mod_python/3.1.3 Python/2.3.5 PRADO/3.1.1