Code Context }
$output = date('Y-m-d H:i:s') . ' ' . ucfirst($type) . ': ' . $message . "\n";
return file_put_contents($filename, $output, FILE_APPEND);
$type = 'error'
$message = '[MissingConnectionException] Database connection "Mysql" is missing, or could not be created.
Exception Attributes: array (
'class' => 'Mysql',
'message' => 'SQLSTATE[HY000] [2002] No such file or directory',
'enabled' => true,
)
Request URL: /Article/306.html
Stack Trace:
#0 /www/wwwroot/libs/cakephp-2.3.5/lib/Cake/Model/Datasource/DboSource.php(262): Mysql->connect()
#1 /www/wwwroot/libs/cakephp-2.3.5/lib/Cake/Model/ConnectionManager.php(107): DboSource->__construct(Array)
#2 /www/wwwroot/libs/cakephp-2.3.5/lib/Cake/Model/Model.php(3221): ConnectionManager::getDataSource('default')
#3 /www/wwwroot/libs/cakephp-2.3.5/lib/Cake/Model/Model.php(1108): Model->setDataSource('default')
#4 /www/wwwroot/libs/cakephp-2.3.5/lib/Cake/Model/Model.php(3243): Model->setSource('userrights')
#5 /www/wwwroot/libs/cakephp-2.3.5/lib/Cake/Model/Model.php(2696): Model->getDataSource()
#6 /www/wwwroot/ypd.com/Controller/AppController.php(88): Model->find('first', Array)
#7 /www/wwwroot/ypd.com/Controller/ArticleController.php(7): AppController->beforeFilter()
#8 [internal function]: ArticleController->beforeFilter(Object(CakeEvent))
#9 /www/wwwroot/libs/cakephp-2.3.5/lib/Cake/Event/CakeEventManager.php(248): call_user_func(Array, Object(CakeEvent))
#10 /www/wwwroot/libs/cakephp-2.3.5/lib/Cake/Controller/Controller.php(670): CakeEventManager->dispatch(Object(CakeEvent))
#11 /www/wwwroot/libs/cakephp-2.3.5/lib/Cake/Routing/Dispatcher.php(184): Controller->startupProcess()
#12 /www/wwwroot/libs/cakephp-2.3.5/lib/Cake/Routing/Dispatcher.php(162): Dispatcher->_invoke(Object(ArticleController), Object(CakeRequest), Object(CakeResponse))
#13 /www/wwwroot/ypd.com/webroot/index.php(96): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#14 {main}'
$debugTypes = array(
(int) 0 => 'notice',
(int) 1 => 'info',
(int) 2 => 'debug'
)
$filename = '/www/wwwroot/ypd.com/tmp/logs/error.log'
$output = '2025-08-21 10:30:08 Error: [MissingConnectionException] Database connection "Mysql" is missing, or could not be created.
Exception Attributes: array (
'class' => 'Mysql',
'message' => 'SQLSTATE[HY000] [2002] No such file or directory',
'enabled' => true,
)
Request URL: /Article/306.html
Stack Trace:
#0 /www/wwwroot/libs/cakephp-2.3.5/lib/Cake/Model/Datasource/DboSource.php(262): Mysql->connect()
#1 /www/wwwroot/libs/cakephp-2.3.5/lib/Cake/Model/ConnectionManager.php(107): DboSource->__construct(Array)
#2 /www/wwwroot/libs/cakephp-2.3.5/lib/Cake/Model/Model.php(3221): ConnectionManager::getDataSource('default')
#3 /www/wwwroot/libs/cakephp-2.3.5/lib/Cake/Model/Model.php(1108): Model->setDataSource('default')
#4 /www/wwwroot/libs/cakephp-2.3.5/lib/Cake/Model/Model.php(3243): Model->setSource('userrights')
#5 /www/wwwroot/libs/cakephp-2.3.5/lib/Cake/Model/Model.php(2696): Model->getDataSource()
#6 /www/wwwroot/ypd.com/Controller/AppController.php(88): Model->find('first', Array)
#7 /www/wwwroot/ypd.com/Controller/ArticleController.php(7): AppController->beforeFilter()
#8 [internal function]: ArticleController->beforeFilter(Object(CakeEvent))
#9 /www/wwwroot/libs/cakephp-2.3.5/lib/Cake/Event/CakeEventManager.php(248): call_user_func(Array, Object(CakeEvent))
#10 /www/wwwroot/libs/cakephp-2.3.5/lib/Cake/Controller/Controller.php(670): CakeEventManager->dispatch(Object(CakeEvent))
#11 /www/wwwroot/libs/cakephp-2.3.5/lib/Cake/Routing/Dispatcher.php(184): Controller->startupProcess()
#12 /www/wwwroot/libs/cakephp-2.3.5/lib/Cake/Routing/Dispatcher.php(162): Dispatcher->_invoke(Object(ArticleController), Object(CakeRequest), Object(CakeResponse))
#13 /www/wwwroot/ypd.com/webroot/index.php(96): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#14 {main}
'
file_put_contents - [internal], line ??
FileLog::write() - CORE/Cake/Log/Engine/FileLog.php, line 87
CakeLog::write() - CORE/Cake/Log/CakeLog.php, line 453
ErrorHandler::handleException() - CORE/Cake/Error/ErrorHandler.php, line 114
[main] - [internal], line ??