TDbException

Description

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

Source File

/home/dna/domains/inwestor-poddebice.pl/public_html/framework/Data/TDbConnection.php (195)

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

Stack Trace

#0 /home/dna/domains/inwestor-poddebice.pl/public_html/framework/Data/TDbConnection.php(168): TDbConnection->open()
#1 /home/dna/domains/inwestor-poddebice.pl/public_html/framework/Data/ActiveRecord/TActiveRecord.php(314): TDbConnection->setActive(true)
#2 /home/dna/domains/inwestor-poddebice.pl/public_html/framework/Data/ActiveRecord/TActiveRecord.php(326): TActiveRecord::getActiveDbConnection()
#3 /home/dna/domains/inwestor-poddebice.pl/public_html/framework/Data/ActiveRecord/TActiveRecordGateway.php(134): TActiveRecord->getDbConnection()
#4 /home/dna/domains/inwestor-poddebice.pl/public_html/framework/Data/ActiveRecord/TActiveRecordGateway.php(196): TActiveRecordGateway->getCommand(Object(PagesRecord))
#5 /home/dna/domains/inwestor-poddebice.pl/public_html/framework/Data/ActiveRecord/TActiveRecord.php(617): TActiveRecordGateway->findRecordByPK(Object(PagesRecord), 7)
#6 /home/dna/domains/inwestor-poddebice.pl/public_html/protected/Pages/Frontend/Contact.php(6): TActiveRecord->findByPk(7)
#7 /home/dna/domains/inwestor-poddebice.pl/public_html/framework/Web/UI/TControl.php(1293): Contact->onLoad(NULL)
#8 /home/dna/domains/inwestor-poddebice.pl/public_html/framework/Web/UI/TPage.php(220): TControl->loadRecursive()
#9 /home/dna/domains/inwestor-poddebice.pl/public_html/framework/Web/UI/TPage.php(201): TPage->processNormalRequest(Object(THtmlWriter))
#10 /home/dna/domains/inwestor-poddebice.pl/public_html/framework/Web/Services/TPageService.php(522): TPage->run(Object(THtmlWriter))
#11 /home/dna/domains/inwestor-poddebice.pl/public_html/framework/Web/Services/TPageService.php(468): TPageService->runPage(Object(Contact), Array)
#12 /home/dna/domains/inwestor-poddebice.pl/public_html/framework/TApplication.php(1219): TPageService->run()
#13 /home/dna/domains/inwestor-poddebice.pl/public_html/framework/TApplication.php(408): TApplication->runService()
#14 /home/dna/domains/inwestor-poddebice.pl/public_html/index.php(15): TApplication->run()
#15 {main}
2019-03-22 19:42 Apache/2 PRADO/3.2.4