TDbException

Description

TDbConnection failed to establish DB connection: SQLSTATE[08006] [7] could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?

Source File

/var/www/sled/prado/framework/Data/TDbConnection.php (177)

0166:         {
0167:             try
0168:             {
0169:                 $this->_pdo=new PDO($this->getConnectionString(),$this->getUsername(),
0170:                                     $this->getPassword(),$this->_attributes);
0171:                 $this->_pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
0172:                 $this->_active=true;
0173:                 $this->setConnectionCharset();
0174:             }
0175:             catch(PDOException $e)
0176:             {
0177: throw new TDbException('dbconnection_open_failed',$e->getMessage());
0178: } 0179: } 0180: } 0181: 0182: /** 0183: * Closes the currently active DB connection. 0184: * It does nothing if the connection is already closed. 0185: */ 0186: protected function close() 0187: { 0188: $this->_pdo=null; 0189: $this->_active=false;

Stack Trace

#0 /var/www/sled/prado/framework/Data/TDbConnection.php(153): TDbConnection->open()
#1 /var/www/sled/prado/framework/TComponent.php(135): TDbConnection->setActive(true)
#2 /var/www/sled/protected/layouts/MainLayout.php(10): TComponent->__set('Active', true)
#3 /var/www/sled/prado/framework/pradolite.php(4093): MainLayout->onInit(NULL)
#4 /var/www/sled/prado/framework/pradolite.php(5465): TControl->initRecursive(Object(LoginUser))
#5 /var/www/sled/prado/framework/pradolite.php(5581): TCompositeControl->initRecursive(Object(LoginUser))
#6 /var/www/sled/prado/framework/pradolite.php(4078): TTemplateControl->initRecursive(Object(LoginUser))
#7 /var/www/sled/prado/framework/pradolite.php(5465): TControl->initRecursive(NULL)
#8 /var/www/sled/prado/framework/pradolite.php(5581): TCompositeControl->initRecursive(NULL)
#9 /var/www/sled/prado/framework/pradolite.php(6085): TTemplateControl->initRecursive()
#10 /var/www/sled/prado/framework/pradolite.php(6080): TPage->processNormalRequest(Object(THtmlWriter))
#11 /var/www/sled/prado/framework/pradolite.php(8201): TPage->run(Object(THtmlWriter))
#12 /var/www/sled/prado/framework/pradolite.php(8167): TPageService->runPage(Object(LoginUser), Array)
#13 /var/www/sled/prado/framework/pradolite.php(9128): TPageService->run()
#14 /var/www/sled/prado/framework/pradolite.php(8743): TApplication->runService()
#15 /var/www/sled/index.php(25): TApplication->run()
#16 {main}
2014-10-20 04:38 Apache/2.2.20 (Ubuntu) PRADO/3.1.2