Warning (2) : mysqli::__construct(): (HY000/2002): Connection refused [APP/Lib/Log/Engine/DatabaseLog.php , line 58 ]Code Context $config = new QlibDATABASE_CONFIG ();
if(!empty( $config -> qbase )) {
$this -> mysqli = new mysqli ( $config -> qbase [ 'host' ], $config -> qbase [ 'login' ], $config -> qbase [ 'password' ], $config -> qbase [ 'database' ]);
$type = 'error'
$data = '[MissingConnectionException] Database connection "Mysql" is missing, or could not be created.
Exception Attributes: array (
'class' => 'Mysql',
'message' => 'SQLSTATE[HY000] [2002] No route to host',
'enabled' => true,
)
Request URL: /users/access?url=%2Fusers%2Faccess
Stack Trace:
#0 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Datasource/DboSource.php(279): Mysql->connect()
#1 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/ConnectionManager.php(105): DboSource->__construct()
#2 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Model.php(3659): ConnectionManager::getDataSource()
#3 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Model.php(1162): Model->setDataSource()
#4 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Model.php(3686): Model->setSource()
#5 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Model.php(3053): Model->getDataSource()
#6 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Model.php(3025): Model->_readDataSource()
#7 /mnt/www/q2q.co.uk/public_html/q2q.co.uk/app/Controller/AppController.php(291): Model->find()
#8 /mnt/www/q2q.co.uk/public_html/q2q.co.uk/app/Controller/AppController.php(174): AppController->getNewsItems()
#9 /mnt/www/q2q.co.uk/public_html/q2q.co.uk/app/Controller/UsersController.php(12): AppController->beforeFilter()
#10 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Event/CakeEventManager.php(244): UsersController->beforeFilter()
#11 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Controller/Controller.php(682): CakeEventManager->dispatch()
#12 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Routing/Dispatcher.php(189): Controller->startupProcess()
#13 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke()
#14 /mnt/www/q2q.co.uk/public_html/q2q.co.uk/app/webroot/index.php(90): Dispatcher->dispatch()
#15 /mnt/www/q2q.co.uk/public_html/index.php(45): require('/mnt/www/q2q.co...')
#16 {main}'
$config = object(QlibDATABASE_CONFIG) {
default => array(
'password' => '*****',
'login' => '*****',
'host' => '*****',
'database' => '*****',
'port' => '*****',
'datasource' => 'Database/Mysql',
'persistent' => false,
'encoding' => 'utf8mb4'
)
qbase => array(
'password' => '*****',
'login' => '*****',
'host' => '*****',
'database' => '*****',
'port' => '*****',
'datasource' => 'Database/Mysql',
'persistent' => false,
'prefix' => '',
'encoding' => 'utf8mb4'
)
q2q => array(
'password' => '*****',
'login' => '*****',
'host' => '*****',
'database' => '*****',
'port' => '*****',
'datasource' => 'Database/Mysql',
'persistent' => false,
'encoding' => 'utf8mb4'
)
archive => array(
'password' => '*****',
'login' => '*****',
'host' => '*****',
'database' => '*****',
'datasource' => 'Database/Mysql',
'persistent' => false,
'encoding' => 'utf8mb4'
)
testing => array(
'password' => '*****',
'login' => '*****',
'host' => '*****',
'database' => '*****',
'port' => '*****',
'datasource' => 'Database/Mysql',
'persistent' => false,
'encoding' => 'utf8mb4'
)
} mysqli::__construct() - [internal], line ??
DatabaseLog::write2db() - APP/Lib/Log/Engine/DatabaseLog.php, line 58
DatabaseLog::write() - APP/Lib/Log/Engine/DatabaseLog.php, line 28
CakeLog::write() - CORE/Cake/Log/CakeLog.php, line 445
ErrorHandler::_log() - APP/Lib/Error/ErrorHandler.php, line 191
ErrorHandler::handleException() - APP/Lib/Error/ErrorHandler.php, line 120
[main] - [internal], line ?? Warning (2) : mysqli::real_escape_string() [<a href='http://php.net/mysqli.real-escape-string'>mysqli.real-escape-string</a>]: Couldn't fetch mysqli [APP/Lib/Log/Engine/DatabaseLog.php , line 81 ]Code Context //generate SQL query - put all data into an array
$save = [
'type' => $this -> mysqli -> real_escape_string ( $type ),
$type = 'error'
$data = array(
'message' => '[MissingConnectionException] Database connection "Mysql" is missing, or could not be created.
Exception Attributes: array (
'class' => 'Mysql',
'message' => 'SQLSTATE[HY000] [2002] No route to host',
'enabled' => true,
)
Request URL: /users/access?url=%2Fusers%2Faccess
Stack Trace:
#0 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Datasource/DboSource.php(279): Mysql->connect()
#1 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/ConnectionManager.php(105): DboSource->__construct()
#2 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Model.php(3659): ConnectionManager::getDataSource()
#3 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Model.php(1162): Model->setDataSource()
#4 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Model.php(3686): Model->setSource()
#5 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Model.php(3053): Model->getDataSource()
#6 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Model.php(3025): Model->_readDataSource()
#7 /mnt/www/q2q.co.uk/public_html/q2q.co.uk/app/Controller/AppController.php(291): Model->find()
#8 /mnt/www/q2q.co.uk/public_html/q2q.co.uk/app/Controller/AppController.php(174): AppController->getNewsItems()
#9 /mnt/www/q2q.co.uk/public_html/q2q.co.uk/app/Controller/UsersController.php(12): AppController->beforeFilter()
#10 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Event/CakeEventManager.php(244): UsersController->beforeFilter()
#11 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Controller/Controller.php(682): CakeEventManager->dispatch()
#12 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Routing/Dispatcher.php(189): Controller->startupProcess()
#13 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke()
#14 /mnt/www/q2q.co.uk/public_html/q2q.co.uk/app/webroot/index.php(90): Dispatcher->dispatch()
#15 /mnt/www/q2q.co.uk/public_html/index.php(45): require('/mnt/www/q2q.co...')
#16 {main}'
)
$config = object(QlibDATABASE_CONFIG) {
default => array(
'password' => '*****',
'login' => '*****',
'host' => '*****',
'database' => '*****',
'port' => '*****',
'datasource' => 'Database/Mysql',
'persistent' => false,
'encoding' => 'utf8mb4'
)
qbase => array(
'password' => '*****',
'login' => '*****',
'host' => '*****',
'database' => '*****',
'port' => '*****',
'datasource' => 'Database/Mysql',
'persistent' => false,
'prefix' => '',
'encoding' => 'utf8mb4'
)
q2q => array(
'password' => '*****',
'login' => '*****',
'host' => '*****',
'database' => '*****',
'port' => '*****',
'datasource' => 'Database/Mysql',
'persistent' => false,
'encoding' => 'utf8mb4'
)
archive => array(
'password' => '*****',
'login' => '*****',
'host' => '*****',
'database' => '*****',
'datasource' => 'Database/Mysql',
'persistent' => false,
'encoding' => 'utf8mb4'
)
testing => array(
'password' => '*****',
'login' => '*****',
'host' => '*****',
'database' => '*****',
'port' => '*****',
'datasource' => 'Database/Mysql',
'persistent' => false,
'encoding' => 'utf8mb4'
)
}
$item = array(
'function' => 'handleException',
'class' => 'ErrorHandler',
'type' => '::',
'args' => array(
(int) 0 => object(MissingConnectionException) {}
)
)
$i = (int) 4
$file = '/mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Log/CakeLog.php' mysqli::real_escape_string() - [internal], line ??
DatabaseLog::write2db() - APP/Lib/Log/Engine/DatabaseLog.php, line 81
DatabaseLog::write() - APP/Lib/Log/Engine/DatabaseLog.php, line 28
CakeLog::write() - CORE/Cake/Log/CakeLog.php, line 445
ErrorHandler::_log() - APP/Lib/Error/ErrorHandler.php, line 191
ErrorHandler::handleException() - APP/Lib/Error/ErrorHandler.php, line 120
[main] - [internal], line ?? Warning (2) : mysqli::real_escape_string() [<a href='http://php.net/mysqli.real-escape-string'>mysqli.real-escape-string</a>]: Couldn't fetch mysqli [APP/Lib/Log/Engine/DatabaseLog.php , line 82 ]Code Context $save = [
'type' => $this -> mysqli -> real_escape_string ( $type ),
'url' => $this -> mysqli -> real_escape_string ( $_SERVER [ 'REQUEST_URI' ]),
$type = 'error'
$data = array(
'message' => '[MissingConnectionException] Database connection "Mysql" is missing, or could not be created.
Exception Attributes: array (
'class' => 'Mysql',
'message' => 'SQLSTATE[HY000] [2002] No route to host',
'enabled' => true,
)
Request URL: /users/access?url=%2Fusers%2Faccess
Stack Trace:
#0 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Datasource/DboSource.php(279): Mysql->connect()
#1 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/ConnectionManager.php(105): DboSource->__construct()
#2 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Model.php(3659): ConnectionManager::getDataSource()
#3 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Model.php(1162): Model->setDataSource()
#4 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Model.php(3686): Model->setSource()
#5 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Model.php(3053): Model->getDataSource()
#6 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Model.php(3025): Model->_readDataSource()
#7 /mnt/www/q2q.co.uk/public_html/q2q.co.uk/app/Controller/AppController.php(291): Model->find()
#8 /mnt/www/q2q.co.uk/public_html/q2q.co.uk/app/Controller/AppController.php(174): AppController->getNewsItems()
#9 /mnt/www/q2q.co.uk/public_html/q2q.co.uk/app/Controller/UsersController.php(12): AppController->beforeFilter()
#10 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Event/CakeEventManager.php(244): UsersController->beforeFilter()
#11 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Controller/Controller.php(682): CakeEventManager->dispatch()
#12 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Routing/Dispatcher.php(189): Controller->startupProcess()
#13 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke()
#14 /mnt/www/q2q.co.uk/public_html/q2q.co.uk/app/webroot/index.php(90): Dispatcher->dispatch()
#15 /mnt/www/q2q.co.uk/public_html/index.php(45): require('/mnt/www/q2q.co...')
#16 {main}'
)
$config = object(QlibDATABASE_CONFIG) {
default => array(
'password' => '*****',
'login' => '*****',
'host' => '*****',
'database' => '*****',
'port' => '*****',
'datasource' => 'Database/Mysql',
'persistent' => false,
'encoding' => 'utf8mb4'
)
qbase => array(
'password' => '*****',
'login' => '*****',
'host' => '*****',
'database' => '*****',
'port' => '*****',
'datasource' => 'Database/Mysql',
'persistent' => false,
'prefix' => '',
'encoding' => 'utf8mb4'
)
q2q => array(
'password' => '*****',
'login' => '*****',
'host' => '*****',
'database' => '*****',
'port' => '*****',
'datasource' => 'Database/Mysql',
'persistent' => false,
'encoding' => 'utf8mb4'
)
archive => array(
'password' => '*****',
'login' => '*****',
'host' => '*****',
'database' => '*****',
'datasource' => 'Database/Mysql',
'persistent' => false,
'encoding' => 'utf8mb4'
)
testing => array(
'password' => '*****',
'login' => '*****',
'host' => '*****',
'database' => '*****',
'port' => '*****',
'datasource' => 'Database/Mysql',
'persistent' => false,
'encoding' => 'utf8mb4'
)
}
$item = array(
'function' => 'handleException',
'class' => 'ErrorHandler',
'type' => '::',
'args' => array(
(int) 0 => object(MissingConnectionException) {}
)
)
$i = (int) 4
$file = '/mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Log/CakeLog.php' mysqli::real_escape_string() - [internal], line ??
DatabaseLog::write2db() - APP/Lib/Log/Engine/DatabaseLog.php, line 82
DatabaseLog::write() - APP/Lib/Log/Engine/DatabaseLog.php, line 28
CakeLog::write() - CORE/Cake/Log/CakeLog.php, line 445
ErrorHandler::_log() - APP/Lib/Error/ErrorHandler.php, line 191
ErrorHandler::handleException() - APP/Lib/Error/ErrorHandler.php, line 120
[main] - [internal], line ?? Warning (2) : mysqli::real_escape_string() [<a href='http://php.net/mysqli.real-escape-string'>mysqli.real-escape-string</a>]: Couldn't fetch mysqli [APP/Lib/Log/Engine/DatabaseLog.php , line 96 ]Code Context //merge $data array values
foreach([ 'message' , 'sub_type' , 'code' , 'description' , 'file' , 'line' ] as $key ) {
if( array_key_exists ( $key , $data )) $save [ $key ] = $this -> mysqli -> real_escape_string ( $data [ $key ]);
$type = 'error'
$data = array(
'message' => '[MissingConnectionException] Database connection "Mysql" is missing, or could not be created.
Exception Attributes: array (
'class' => 'Mysql',
'message' => 'SQLSTATE[HY000] [2002] No route to host',
'enabled' => true,
)
Request URL: /users/access?url=%2Fusers%2Faccess
Stack Trace:
#0 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Datasource/DboSource.php(279): Mysql->connect()
#1 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/ConnectionManager.php(105): DboSource->__construct()
#2 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Model.php(3659): ConnectionManager::getDataSource()
#3 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Model.php(1162): Model->setDataSource()
#4 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Model.php(3686): Model->setSource()
#5 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Model.php(3053): Model->getDataSource()
#6 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Model.php(3025): Model->_readDataSource()
#7 /mnt/www/q2q.co.uk/public_html/q2q.co.uk/app/Controller/AppController.php(291): Model->find()
#8 /mnt/www/q2q.co.uk/public_html/q2q.co.uk/app/Controller/AppController.php(174): AppController->getNewsItems()
#9 /mnt/www/q2q.co.uk/public_html/q2q.co.uk/app/Controller/UsersController.php(12): AppController->beforeFilter()
#10 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Event/CakeEventManager.php(244): UsersController->beforeFilter()
#11 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Controller/Controller.php(682): CakeEventManager->dispatch()
#12 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Routing/Dispatcher.php(189): Controller->startupProcess()
#13 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke()
#14 /mnt/www/q2q.co.uk/public_html/q2q.co.uk/app/webroot/index.php(90): Dispatcher->dispatch()
#15 /mnt/www/q2q.co.uk/public_html/index.php(45): require('/mnt/www/q2q.co...')
#16 {main}'
)
$config = object(QlibDATABASE_CONFIG) {
default => array(
'password' => '*****',
'login' => '*****',
'host' => '*****',
'database' => '*****',
'port' => '*****',
'datasource' => 'Database/Mysql',
'persistent' => false,
'encoding' => 'utf8mb4'
)
qbase => array(
'password' => '*****',
'login' => '*****',
'host' => '*****',
'database' => '*****',
'port' => '*****',
'datasource' => 'Database/Mysql',
'persistent' => false,
'prefix' => '',
'encoding' => 'utf8mb4'
)
q2q => array(
'password' => '*****',
'login' => '*****',
'host' => '*****',
'database' => '*****',
'port' => '*****',
'datasource' => 'Database/Mysql',
'persistent' => false,
'encoding' => 'utf8mb4'
)
archive => array(
'password' => '*****',
'login' => '*****',
'host' => '*****',
'database' => '*****',
'datasource' => 'Database/Mysql',
'persistent' => false,
'encoding' => 'utf8mb4'
)
testing => array(
'password' => '*****',
'login' => '*****',
'host' => '*****',
'database' => '*****',
'port' => '*****',
'datasource' => 'Database/Mysql',
'persistent' => false,
'encoding' => 'utf8mb4'
)
}
$item = array(
'function' => 'handleException',
'class' => 'ErrorHandler',
'type' => '::',
'args' => array(
(int) 0 => object(MissingConnectionException) {}
)
)
$i = (int) 4
$file = '/mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Log/CakeLog.php'
$save = array(
'type' => false,
'url' => false,
'is_q2q' => (int) 1,
'is_qbase' => (int) 0,
'is_daemon' => (int) 0,
'ip_address' => (int) 3628718343
)
$event_id = null
$key = 'message' mysqli::real_escape_string() - [internal], line ??
DatabaseLog::write2db() - APP/Lib/Log/Engine/DatabaseLog.php, line 96
DatabaseLog::write() - APP/Lib/Log/Engine/DatabaseLog.php, line 28
CakeLog::write() - CORE/Cake/Log/CakeLog.php, line 445
ErrorHandler::_log() - APP/Lib/Error/ErrorHandler.php, line 191
ErrorHandler::handleException() - APP/Lib/Error/ErrorHandler.php, line 120
[main] - [internal], line ?? Warning (2) : mysqli::query() [<a href='http://php.net/mysqli.query'>mysqli.query</a>]: Couldn't fetch mysqli [APP/Lib/Log/Engine/DatabaseLog.php , line 117 ]Code Context
//save data to database
return $this -> mysqli -> query ( $sql );
$type = 'error'
$data = array(
'message' => '[MissingConnectionException] Database connection "Mysql" is missing, or could not be created.
Exception Attributes: array (
'class' => 'Mysql',
'message' => 'SQLSTATE[HY000] [2002] No route to host',
'enabled' => true,
)
Request URL: /users/access?url=%2Fusers%2Faccess
Stack Trace:
#0 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Datasource/DboSource.php(279): Mysql->connect()
#1 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/ConnectionManager.php(105): DboSource->__construct()
#2 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Model.php(3659): ConnectionManager::getDataSource()
#3 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Model.php(1162): Model->setDataSource()
#4 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Model.php(3686): Model->setSource()
#5 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Model.php(3053): Model->getDataSource()
#6 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Model.php(3025): Model->_readDataSource()
#7 /mnt/www/q2q.co.uk/public_html/q2q.co.uk/app/Controller/AppController.php(291): Model->find()
#8 /mnt/www/q2q.co.uk/public_html/q2q.co.uk/app/Controller/AppController.php(174): AppController->getNewsItems()
#9 /mnt/www/q2q.co.uk/public_html/q2q.co.uk/app/Controller/UsersController.php(12): AppController->beforeFilter()
#10 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Event/CakeEventManager.php(244): UsersController->beforeFilter()
#11 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Controller/Controller.php(682): CakeEventManager->dispatch()
#12 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Routing/Dispatcher.php(189): Controller->startupProcess()
#13 /mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke()
#14 /mnt/www/q2q.co.uk/public_html/q2q.co.uk/app/webroot/index.php(90): Dispatcher->dispatch()
#15 /mnt/www/q2q.co.uk/public_html/index.php(45): require('/mnt/www/q2q.co...')
#16 {main}'
)
$config = object(QlibDATABASE_CONFIG) {
default => array(
'password' => '*****',
'login' => '*****',
'host' => '*****',
'database' => '*****',
'port' => '*****',
'datasource' => 'Database/Mysql',
'persistent' => false,
'encoding' => 'utf8mb4'
)
qbase => array(
'password' => '*****',
'login' => '*****',
'host' => '*****',
'database' => '*****',
'port' => '*****',
'datasource' => 'Database/Mysql',
'persistent' => false,
'prefix' => '',
'encoding' => 'utf8mb4'
)
q2q => array(
'password' => '*****',
'login' => '*****',
'host' => '*****',
'database' => '*****',
'port' => '*****',
'datasource' => 'Database/Mysql',
'persistent' => false,
'encoding' => 'utf8mb4'
)
archive => array(
'password' => '*****',
'login' => '*****',
'host' => '*****',
'database' => '*****',
'datasource' => 'Database/Mysql',
'persistent' => false,
'encoding' => 'utf8mb4'
)
testing => array(
'password' => '*****',
'login' => '*****',
'host' => '*****',
'database' => '*****',
'port' => '*****',
'datasource' => 'Database/Mysql',
'persistent' => false,
'encoding' => 'utf8mb4'
)
}
$item = array(
'function' => 'handleException',
'class' => 'ErrorHandler',
'type' => '::',
'args' => array(
(int) 0 => object(MissingConnectionException) {}
)
)
$i = (int) 4
$file = '/mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Log/CakeLog.php'
$save = array(
'type' => false,
'url' => false,
'is_q2q' => (int) 1,
'is_qbase' => (int) 0,
'is_daemon' => (int) 0,
'ip_address' => (int) 3628718343,
'message' => false
)
$event_id = null
$key = 'line'
$fields = 'type`, `url`, `is_q2q`, `is_qbase`, `is_daemon`, `ip_address`, `message'
$values = '', '', '1', '0', '0', '3628718343', ''
$sql = 'INSERT INTO `qbase`.`logs` (`id`, `type`, `url`, `is_q2q`, `is_qbase`, `is_daemon`, `ip_address`, `message`, `created`) VALUES (NULL, '', '', '1', '0', '0', '3628718343', '', NOW());' mysqli::query() - [internal], line ??
DatabaseLog::write2db() - APP/Lib/Log/Engine/DatabaseLog.php, line 117
DatabaseLog::write() - APP/Lib/Log/Engine/DatabaseLog.php, line 28
CakeLog::write() - CORE/Cake/Log/CakeLog.php, line 445
ErrorHandler::_log() - APP/Lib/Error/ErrorHandler.php, line 191
ErrorHandler::handleException() - APP/Lib/Error/ErrorHandler.php, line 120
[main] - [internal], line ??
Q2Q - Errors
Missing Database Connection
Error:
A Database connection using "Mysql" was missing or unable to connect.
The database server returned this error: SQLSTATE[HY000] [2002] No route to host
Notice:
If you want to customize this error message, create app/View/Errors/missing_connection.ctp
Stack Trace
CORE/Cake/Model/Datasource/DboSource.php line 279 → Mysql->connect() ));
}
if ( $autoConnect ) {
$this -> connect ();
}
CORE/Cake/Model/ConnectionManager.php line 105 → DboSource->__construct() 'message' => 'Datasource is not found in Model/Datasource package.'
));
}
static:: $_dataSources [ $name ] = new $class (static:: $config ->{ $name });
static:: $_dataSources [ $name ]-> configKeyName = $name ;
CORE/Cake/Model/Model.php line 3659 → ConnectionManager::getDataSource() $this -> useDbConfig = $dataSource ;
}
$db = ConnectionManager :: getDataSource ( $this -> useDbConfig );
if (!empty( $oldConfig ) && isset( $db -> config [ 'prefix' ])) {
CORE/Cake/Model/Model.php line 1162 → Model->setDataSource() * @return void
*/
public function setSource ( $tableName ) {
$this -> setDataSource ( $this -> useDbConfig );
$db = ConnectionManager :: getDataSource ( $this -> useDbConfig );
CORE/Cake/Model/Model.php line 3686 → Model->setSource() public function getDataSource () {
if (! $this -> _sourceConfigured && $this -> useTable !== false ) {
$this -> _sourceConfigured = true ;
$this -> setSource ( $this -> useTable );
}
CORE/Cake/Model/Model.php line 3053 → Model->getDataSource() * @return array
*/
protected function _readDataSource ( $type , $query ) {
$results = $this -> getDataSource ()-> read ( $this , $query );
$this -> resetAssociations ();
CORE/Cake/Model/Model.php line 3025 → Model->_readDataSource() return null ;
}
return $this -> _readDataSource ( $type , $query );
}
APP/Controller/AppController.php line 291 → Model->find() //$this->loadModel('NewsItem');
$newsItems = $this -> NewsItem -> find ( 'all' ,
array(
'recursive' => - 1 ,
'order' => 'NewsItem.date_displayed DESC' ,
APP/Controller/AppController.php line 174 → AppController->getNewsItems() // $this->img = new ImageComponent();//I believe this is only being used once in the Qhtml helper and is loaded when required. The Image component is now obsolete and should be replaced by the static Image class
$this -> forceSSL ();
$this -> getNewsItems ();
APP/Controller/UsersController.php line 12 → AppController->beforeFilter() // public $uses = array('User','Log');
public function beforeFilter () {
// $this->Auth->autoRedirect = false;
parent :: beforeFilter ();
CORE/Cake/Event/CakeEventManager.php line 244 → UsersController->beforeFilter() if ( $listener [ 'passParams' ] === true ) {
$result = call_user_func_array ( $listener [ 'callable' ], $event -> data );
} else {
$result = call_user_func ( $listener [ 'callable' ], $event );
}
CORE/Cake/Controller/Controller.php line 682 → CakeEventManager->dispatch() * @ triggers Controller . startup $this
*/
public function startupProcess () {
$this -> getEventManager ()-> dispatch (new CakeEvent ( 'Controller.initialize' , $this ));
$this -> getEventManager ()-> dispatch (new CakeEvent ( 'Controller.startup' , $this ));
CORE/Cake/Routing/Dispatcher.php line 189 → Controller->startupProcess() */
protected function _invoke ( Controller $controller , CakeRequest $request ) {
$controller -> constructClasses ();
$controller -> startupProcess ();
CORE/Cake/Routing/Dispatcher.php line 167 → Dispatcher->_invoke() ));
}
$response = $this -> _invoke ( $controller , $request );
if (isset( $request -> params [ 'return' ])) {
APP/webroot/index.php line 90 → Dispatcher->dispatch() App :: uses ( 'Dispatcher' , 'Routing' );
$Dispatcher = new Dispatcher ();
$Dispatcher -> dispatch (new CakeRequest (), new CakeResponse ());
/mnt/www/q2q.co.uk/public_html/index.php line 45 → require(string) // define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'lib');
// }
require ROOT . DS . APP_DIR . DS . WEBROOT_DIR . DS . 'index.php' ;
'/mnt/www/q2q.co.uk/public_html/q2q.co.uk/app/webroot/index.php'
Warning (2) : mysqli::real_escape_string() [<a href='http://php.net/mysqli.real-escape-string'>mysqli.real-escape-string</a>]: Couldn't fetch mysqli [APP/Lib/Log/Engine/DatabaseLog.php , line 81 ]Code Context //generate SQL query - put all data into an array
$save = [
'type' => $this -> mysqli -> real_escape_string ( $type ),
$type = 'error'
$data = array(
'message' => 'Database connection "Mysql" is missing, or could not be created.',
'code' => (int) 500,
'file' => '/mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Datasource/Database/Mysql.php',
'line' => (int) 200
) mysqli::real_escape_string() - [internal], line ??
DatabaseLog::write2db() - APP/Lib/Log/Engine/DatabaseLog.php, line 81
DatabaseLog::write() - APP/Lib/Log/Engine/DatabaseLog.php, line 28
CakeLog::write() - CORE/Cake/Log/CakeLog.php, line 445
ErrorHandler::handleException() - APP/Lib/Error/ErrorHandler.php, line 130
[main] - [internal], line ?? Warning (2) : mysqli::real_escape_string() [<a href='http://php.net/mysqli.real-escape-string'>mysqli.real-escape-string</a>]: Couldn't fetch mysqli [APP/Lib/Log/Engine/DatabaseLog.php , line 82 ]Code Context $save = [
'type' => $this -> mysqli -> real_escape_string ( $type ),
'url' => $this -> mysqli -> real_escape_string ( $_SERVER [ 'REQUEST_URI' ]),
$type = 'error'
$data = array(
'message' => 'Database connection "Mysql" is missing, or could not be created.',
'code' => (int) 500,
'file' => '/mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Datasource/Database/Mysql.php',
'line' => (int) 200
) mysqli::real_escape_string() - [internal], line ??
DatabaseLog::write2db() - APP/Lib/Log/Engine/DatabaseLog.php, line 82
DatabaseLog::write() - APP/Lib/Log/Engine/DatabaseLog.php, line 28
CakeLog::write() - CORE/Cake/Log/CakeLog.php, line 445
ErrorHandler::handleException() - APP/Lib/Error/ErrorHandler.php, line 130
[main] - [internal], line ?? Warning (2) : mysqli::real_escape_string() [<a href='http://php.net/mysqli.real-escape-string'>mysqli.real-escape-string</a>]: Couldn't fetch mysqli [APP/Lib/Log/Engine/DatabaseLog.php , line 96 ]Code Context //merge $data array values
foreach([ 'message' , 'sub_type' , 'code' , 'description' , 'file' , 'line' ] as $key ) {
if( array_key_exists ( $key , $data )) $save [ $key ] = $this -> mysqli -> real_escape_string ( $data [ $key ]);
$type = 'error'
$data = array(
'message' => 'Database connection "Mysql" is missing, or could not be created.',
'code' => (int) 500,
'file' => '/mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Datasource/Database/Mysql.php',
'line' => (int) 200
)
$save = array(
'type' => false,
'url' => false,
'is_q2q' => (int) 1,
'is_qbase' => (int) 0,
'is_daemon' => (int) 0,
'ip_address' => (int) 3628718343
)
$event_id = null
$key = 'message' mysqli::real_escape_string() - [internal], line ??
DatabaseLog::write2db() - APP/Lib/Log/Engine/DatabaseLog.php, line 96
DatabaseLog::write() - APP/Lib/Log/Engine/DatabaseLog.php, line 28
CakeLog::write() - CORE/Cake/Log/CakeLog.php, line 445
ErrorHandler::handleException() - APP/Lib/Error/ErrorHandler.php, line 130
[main] - [internal], line ?? Warning (2) : mysqli::real_escape_string() [<a href='http://php.net/mysqli.real-escape-string'>mysqli.real-escape-string</a>]: Couldn't fetch mysqli [APP/Lib/Log/Engine/DatabaseLog.php , line 96 ]Code Context //merge $data array values
foreach([ 'message' , 'sub_type' , 'code' , 'description' , 'file' , 'line' ] as $key ) {
if( array_key_exists ( $key , $data )) $save [ $key ] = $this -> mysqli -> real_escape_string ( $data [ $key ]);
$type = 'error'
$data = array(
'message' => 'Database connection "Mysql" is missing, or could not be created.',
'code' => (int) 500,
'file' => '/mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Datasource/Database/Mysql.php',
'line' => (int) 200
)
$save = array(
'type' => false,
'url' => false,
'is_q2q' => (int) 1,
'is_qbase' => (int) 0,
'is_daemon' => (int) 0,
'ip_address' => (int) 3628718343,
'message' => false
)
$event_id = null
$key = 'code' mysqli::real_escape_string() - [internal], line ??
DatabaseLog::write2db() - APP/Lib/Log/Engine/DatabaseLog.php, line 96
DatabaseLog::write() - APP/Lib/Log/Engine/DatabaseLog.php, line 28
CakeLog::write() - CORE/Cake/Log/CakeLog.php, line 445
ErrorHandler::handleException() - APP/Lib/Error/ErrorHandler.php, line 130
[main] - [internal], line ?? Warning (2) : mysqli::real_escape_string() [<a href='http://php.net/mysqli.real-escape-string'>mysqli.real-escape-string</a>]: Couldn't fetch mysqli [APP/Lib/Log/Engine/DatabaseLog.php , line 96 ]Code Context //merge $data array values
foreach([ 'message' , 'sub_type' , 'code' , 'description' , 'file' , 'line' ] as $key ) {
if( array_key_exists ( $key , $data )) $save [ $key ] = $this -> mysqli -> real_escape_string ( $data [ $key ]);
$type = 'error'
$data = array(
'message' => 'Database connection "Mysql" is missing, or could not be created.',
'code' => (int) 500,
'file' => '/mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Datasource/Database/Mysql.php',
'line' => (int) 200
)
$save = array(
'type' => false,
'url' => false,
'is_q2q' => (int) 1,
'is_qbase' => (int) 0,
'is_daemon' => (int) 0,
'ip_address' => (int) 3628718343,
'message' => false,
'code' => false
)
$event_id = null
$key = 'file' mysqli::real_escape_string() - [internal], line ??
DatabaseLog::write2db() - APP/Lib/Log/Engine/DatabaseLog.php, line 96
DatabaseLog::write() - APP/Lib/Log/Engine/DatabaseLog.php, line 28
CakeLog::write() - CORE/Cake/Log/CakeLog.php, line 445
ErrorHandler::handleException() - APP/Lib/Error/ErrorHandler.php, line 130
[main] - [internal], line ?? Warning (2) : mysqli::real_escape_string() [<a href='http://php.net/mysqli.real-escape-string'>mysqli.real-escape-string</a>]: Couldn't fetch mysqli [APP/Lib/Log/Engine/DatabaseLog.php , line 96 ]Code Context //merge $data array values
foreach([ 'message' , 'sub_type' , 'code' , 'description' , 'file' , 'line' ] as $key ) {
if( array_key_exists ( $key , $data )) $save [ $key ] = $this -> mysqli -> real_escape_string ( $data [ $key ]);
$type = 'error'
$data = array(
'message' => 'Database connection "Mysql" is missing, or could not be created.',
'code' => (int) 500,
'file' => '/mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Datasource/Database/Mysql.php',
'line' => (int) 200
)
$save = array(
'type' => false,
'url' => false,
'is_q2q' => (int) 1,
'is_qbase' => (int) 0,
'is_daemon' => (int) 0,
'ip_address' => (int) 3628718343,
'message' => false,
'code' => false,
'file' => false
)
$event_id = null
$key = 'line' mysqli::real_escape_string() - [internal], line ??
DatabaseLog::write2db() - APP/Lib/Log/Engine/DatabaseLog.php, line 96
DatabaseLog::write() - APP/Lib/Log/Engine/DatabaseLog.php, line 28
CakeLog::write() - CORE/Cake/Log/CakeLog.php, line 445
ErrorHandler::handleException() - APP/Lib/Error/ErrorHandler.php, line 130
[main] - [internal], line ?? Warning (2) : mysqli::query() [<a href='http://php.net/mysqli.query'>mysqli.query</a>]: Couldn't fetch mysqli [APP/Lib/Log/Engine/DatabaseLog.php , line 117 ]Code Context
//save data to database
return $this -> mysqli -> query ( $sql );
$type = 'error'
$data = array(
'message' => 'Database connection "Mysql" is missing, or could not be created.',
'code' => (int) 500,
'file' => '/mnt/www/q2q.co.uk/public_html/lib/cake/2.10.24/Cake/Model/Datasource/Database/Mysql.php',
'line' => (int) 200
)
$save = array(
'type' => false,
'url' => false,
'is_q2q' => (int) 1,
'is_qbase' => (int) 0,
'is_daemon' => (int) 0,
'ip_address' => (int) 3628718343,
'message' => false,
'code' => false,
'file' => false,
'line' => false
)
$event_id = null
$key = 'line'
$fields = 'type`, `url`, `is_q2q`, `is_qbase`, `is_daemon`, `ip_address`, `message`, `code`, `file`, `line'
$values = '', '', '1', '0', '0', '3628718343', '', '', '', ''
$sql = 'INSERT INTO `qbase`.`logs` (`id`, `type`, `url`, `is_q2q`, `is_qbase`, `is_daemon`, `ip_address`, `message`, `code`, `file`, `line`, `created`) VALUES (NULL, '', '', '1', '0', '0', '3628718343', '', '', '', '', NOW());' mysqli::query() - [internal], line ??
DatabaseLog::write2db() - APP/Lib/Log/Engine/DatabaseLog.php, line 117
DatabaseLog::write() - APP/Lib/Log/Engine/DatabaseLog.php, line 28
CakeLog::write() - CORE/Cake/Log/CakeLog.php, line 445
ErrorHandler::handleException() - APP/Lib/Error/ErrorHandler.php, line 130
[main] - [internal], line ??