Prado\Exceptions\TDbException

Description

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

Source File

${PradoFramework}/Data/TDbConnection.php (200)

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

Stack Trace

#0 ${PradoFramework}/Data/TDbConnection.php(172): Prado\Data\TDbConnection->open()
#1 ${PradoFramework}/Data/ActiveRecord/TActiveRecord.php(323): Prado\Data\TDbConnection->setActive()
#2 ${PradoFramework}/Data/ActiveRecord/TActiveRecord.php(336): Prado\Data\ActiveRecord\TActiveRecord::getActiveDbConnection()
#3 ${PradoFramework}/Data/ActiveRecord/TActiveRecordGateway.php(155): Prado\Data\ActiveRecord\TActiveRecord->getDbConnection()
#4 ${PradoFramework}/Data/ActiveRecord/TActiveRecordGateway.php(271): Prado\Data\ActiveRecord\TActiveRecordGateway->getCommand()
#5 ${PradoFramework}/Data/ActiveRecord/TActiveRecord.php(677): Prado\Data\ActiveRecord\TActiveRecordGateway->findRecordBySql()
#6 ${DocumentRoot}/ti-racconto-la-storia/protected/Controls/ManagedContent.php(20): Prado\Data\ActiveRecord\TActiveRecord->findBySql()
#7 ${PradoFramework}/Web/UI/TControl.php(1317): ManagedContent->onInit()
#8 ${PradoFramework}/Web/UI/TCompositeControl.php(34): Prado\Web\UI\TControl->initRecursive()
#9 ${PradoFramework}/Web/UI/TTemplateControl.php(243): Prado\Web\UI\TCompositeControl->initRecursive()
#10 ${PradoFramework}/Web/UI/TControl.php(1304): Prado\Web\UI\TTemplateControl->initRecursive()
#11 ${PradoFramework}/Web/UI/TControl.php(1304): Prado\Web\UI\TControl->initRecursive()
#12 ${PradoFramework}/Web/UI/TCompositeControl.php(34): Prado\Web\UI\TControl->initRecursive()
#13 ${PradoFramework}/Web/UI/TTemplateControl.php(243): Prado\Web\UI\TCompositeControl->initRecursive()
#14 ${PradoFramework}/Web/UI/TControl.php(1304): Prado\Web\UI\TTemplateControl->initRecursive()
#15 ${PradoFramework}/Web/UI/TCompositeControl.php(34): Prado\Web\UI\TControl->initRecursive()
#16 ${PradoFramework}/Web/UI/TTemplateControl.php(243): Prado\Web\UI\TCompositeControl->initRecursive()
#17 ${PradoFramework}/Web/UI/TPage.php(221): Prado\Web\UI\TTemplateControl->initRecursive()
#18 ${PradoFramework}/Web/UI/TPage.php(209): Prado\Web\UI\TPage->processNormalRequest()
#19 ${PradoFramework}/Web/Services/TPageService.php(527): Prado\Web\UI\TPage->run()
#20 ${PradoFramework}/Web/Services/TPageService.php(464): Prado\Web\Services\TPageService->runPage()
#21 ${PradoFramework}/TApplication.php(1189): Prado\Web\Services\TPageService->run()
#22 ${PradoFramework}/TApplication.php(381): Prado\TApplication->runService()
#23 ${DocumentRoot}/ti-racconto-la-storia/index.php(23): Prado\TApplication->run()
#24 {main}
2026-06-20 09:42 Apache/2.4.29 (Ubuntu) PRADO/4.1.2