TDbException

Description

TDbConnection failed to establish DB connection: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known

Source File

/prado-3.2.2.r3297/framework/Data/TDbConnection.php (197)

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

Stack Trace

#0 /prado-3.2.2.r3297/framework/Data/TDbConnection.php(170): TDbConnection->open()
#1 /prado-3.2.2.r3297/framework/Data/Common/TDbMetaData.php(57): TDbConnection->setActive(true)
#2 /prado-3.2.2.r3297/framework/Data/ActiveRecord/TActiveRecordGateway.php(113): TDbMetaData::getInstance(Object(TDbConnection))
#3 /prado-3.2.2.r3297/framework/Data/ActiveRecord/TActiveRecordGateway.php(93): TActiveRecordGateway->getTableInfo(Object(TDbConnection), 'LanguageCL')
#4 /prado-3.2.2.r3297/framework/Data/ActiveRecord/TActiveRecordGateway.php(138): TActiveRecordGateway->getRecordTableInfo(Object(LanguageCLRecord))
#5 /prado-3.2.2.r3297/framework/Data/ActiveRecord/TActiveRecordGateway.php(198): TActiveRecordGateway->getCommand(Object(LanguageCLRecord))
#6 /prado-3.2.2.r3297/framework/Data/ActiveRecord/TActiveRecord.php(619): TActiveRecordGateway->findRecordByPK(Object(LanguageCLRecord), '1')
#7 /protected/code/kabudachi/cms/core/KabudachiURLMapper.php(50): TActiveRecord->findByPk('1')
#8 /protected/code/kabudachi/cms/core/KabudachiURLMapper.php(29): KabudachiURLMapper->initGlobalizationSettings()
#9 /prado-3.2.2.r3297/framework/TApplication.php(1030): KabudachiURLMapper->init(Object(TXmlElement))
#10 /prado-3.2.2.r3297/framework/TApplication.php(1078): TApplication->applyConfiguration(Object(TApplicationConfiguration), false)
#11 /prado-3.2.2.r3297/framework/TApplication.php(398): TApplication->initApplication()
#12 /kabudachi.php(102): TApplication->run()
#13 /index.php(14): Kabudachi->run()
#14 {main}
2018-01-19 10:48 IdeaWebServer/0.82 (like Apache) PRADO/3.2.2