TDbException

Description

TDbConnection failed to establish DB connection: SQLSTATE[HY000] [2002] No such file or directory

Source File

/home/holiday/framework-3.10/Data/TDbConnection.php (192)

0181:                 $this->_pdo=new PDO($this->getConnectionString(),$this->getUsername(),
0182:                                     $this->getPassword(),$this->_attributes);
0183:                 // This attribute is only useful for PDO::MySql driver.
0184:                 // Ignore the warning if a driver doesn't understand this.
0185:                 @$this->_pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);
0186:                 $this->_pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
0187:                 $this->_active=true;
0188:                 $this->setConnectionCharset();
0189:             }
0190:             catch(PDOException $e)
0191:             {
0192: throw new TDbException('dbconnection_open_failed',$e->getMessage());
0193: } 0194: } 0195: } 0196: 0197: /** 0198: * Closes the currently active DB connection. 0199: * It does nothing if the connection is already closed. 0200: */ 0201: protected function close() 0202: { 0203: $this->_pdo=null; 0204: $this->_active=false;

Stack Trace

#0 /home/holiday/framework-3.10/Data/TDbConnection.php(165): TDbConnection->open()
#1 /home/holiday/framework-3.10/Data/ActiveRecord/TActiveRecord.php(317): TDbConnection->setActive(true)
#2 /home/holiday/framework-3.10/Data/ActiveRecord/TActiveRecord.php(329): TActiveRecord::getActiveDbConnection()
#3 /home/holiday/framework-3.10/Data/ActiveRecord/TActiveRecordGateway.php(136): TActiveRecord->getDbConnection()
#4 /home/holiday/framework-3.10/Data/ActiveRecord/TActiveRecord.php(848): TActiveRecordGateway->getCommand(Object(tblFileError))
#5 /home/holiday/public_html/protected/Common/WPage.php(311): TActiveRecord->__call('findByUrl', Array)
#6 /home/holiday/public_html/protected/Common/WPage.php(311): tblFileError->findByUrl('http://www.holi...')
#7 /home/holiday/public_html/protected/Common/WPage.php(31): WPage->ErrorRedirect()
#8 /home/holiday/public_html/protected/pages/Content.php(15): WPage->onInit(NULL)
#9 /home/holiday/framework-3.10/Web/UI/TControl.php(1270): Content->onInit(NULL)
#10 /home/holiday/framework-3.10/Web/UI/TCompositeControl.php(35): TControl->initRecursive(NULL)
#11 /home/holiday/framework-3.10/Web/UI/TTemplateControl.php(240): TCompositeControl->initRecursive(NULL)
#12 /home/holiday/framework-3.10/Web/UI/TPage.php(207): TTemplateControl->initRecursive()
#13 /home/holiday/framework-3.10/Web/UI/TPage.php(198): TPage->processNormalRequest(Object(THtmlWriter))
#14 /home/holiday/framework-3.10/Web/Services/TPageService.php(498): TPage->run(Object(THtmlWriter))
#15 /home/holiday/framework-3.10/Web/Services/TPageService.php(444): TPageService->runPage(Object(Content), Array)
#16 /home/holiday/framework-3.10/TApplication.php(1095): TPageService->run()
#17 /home/holiday/framework-3.10/TApplication.php(382): TApplication->runService()
#18 /home/holiday/public_html/index.php(20): TApplication->run()
#19 {main}
2015-04-27 13:28 Apache/2.2.29 (Unix) mod_ssl/2.2.29 OpenSSL/1.0.1e-fips PRADO/3.1.10