Missing Database Connection
Error:
A Database connection using "Mysql" was missing or unable to connect.
The database server returned this error: SQLSTATE[HY000] [1045] Access denied for user 'wbfreeca_canada'@'localhost' (using password: YES)
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 260 → Mysql->connect()
));
}
if ($autoConnect) {
$this->connect();
}
- CORE/Cake/Model/ConnectionManager.php line 105 → DboSource->__construct(array)
'message' => 'Datasource is not found in Model/Datasource package.'
));
}
self::$_dataSources[$name] = new $class(self::$config->{$name});
self::$_dataSources[$name]->configKeyName = $name;
array(
'password' => '*****',
'login' => '*****',
'host' => '*****',
'database' => '*****',
'prefix' => '*****',
'datasource' => 'Database/Mysql',
'persistent' => false,
'encoding' => 'utf8'
)
- CORE/Cake/Model/Model.php line 3479 → ConnectionManager::getDataSource(string)
$this->useDbConfig = $dataSource;
}
$db = ConnectionManager::getDataSource($this->useDbConfig);
if (!empty($oldConfig) && isset($db->config['prefix'])) {
- CORE/Cake/Model/Model.php line 1128 → Model->setDataSource(string)
* @return void
*/
public function setSource($tableName) {
$this->setDataSource($this->useDbConfig);
$db = ConnectionManager::getDataSource($this->useDbConfig);
- CORE/Cake/Model/Model.php line 3501 → Model->setSource(string)
public function getDataSource() {
if (!$this->_sourceConfigured && $this->useTable !== false) {
$this->_sourceConfigured = true;
$this->setSource($this->useTable);
}
- CORE/Cake/Model/Model.php line 2905 → Model->getDataSource()
* @return array
*/
protected function _readDataSource($type, $query) {
$results = $this->getDataSource()->read($this, $query);
$this->resetAssociations();
- CORE/Cake/Model/Model.php line 2877 → Model->_readDataSource(string, array)
return null;
}
return $this->_readDataSource($type, $query);
}
'all'
array(
'conditions' => array(
'AND' => array(
[maximum depth reached]
)
),
'fields' => array(
(int) 0 => 'DISTINCT s.id as signupid',
(int) 1 => 'c.name as categoty_name',
(int) 2 => 'c.id as cid',
(int) 3 => 'sc.name as sub_categoty_name',
(int) 4 => 'sc.id as scid',
(int) 5 => 'lc.name as lc_name',
(int) 6 => 'lc.id as lcid',
(int) 7 => 'c.slug',
(int) 8 => 'sc.slug',
(int) 9 => 'lc.slug'
),
'joins' => array(
(int) 0 => array(
[maximum depth reached]
),
(int) 1 => array(
[maximum depth reached]
),
(int) 2 => array(
[maximum depth reached]
),
(int) 3 => array(
[maximum depth reached]
),
(int) 4 => array(
[maximum depth reached]
),
(int) 5 => array(
[maximum depth reached]
)
),
'limit' => null,
'offset' => null,
'order' => array(
(int) 0 => array(
[maximum depth reached]
)
),
'page' => (int) 1,
'group' => array(
(int) 0 => 'lc.name'
),
'callbacks' => true
)
- APP/Controller/LocationsController.php line 139 → Model->find(string, array)
$options['fields'] = array('DISTINCT s.id as signupid','c.name as categoty_name', 'c.id as cid', 'sc.name as sub_categoty_name', 'sc.id as scid', 'lc.name as lc_name', 'lc.id as lcid','c.slug','sc.slug','lc.slug');
$markers = $this->SignupsCategories->find('all', $options);
'all'
array(
'conditions' => array(
'AND' => array(
[maximum depth reached]
)
),
'joins' => array(
(int) 0 => array(
[maximum depth reached]
),
(int) 1 => array(
[maximum depth reached]
),
(int) 2 => array(
[maximum depth reached]
),
(int) 3 => array(
[maximum depth reached]
),
(int) 4 => array(
[maximum depth reached]
),
(int) 5 => array(
[maximum depth reached]
)
),
'order' => array(
(int) 0 => 'c.name',
(int) 1 => 'sc.name',
(int) 2 => 'lc.name'
),
'group' => array(
(int) 0 => 'lc.name'
),
'fields' => array(
(int) 0 => 'DISTINCT s.id as signupid',
(int) 1 => 'c.name as categoty_name',
(int) 2 => 'c.id as cid',
(int) 3 => 'sc.name as sub_categoty_name',
(int) 4 => 'sc.id as scid',
(int) 5 => 'lc.name as lc_name',
(int) 6 => 'lc.id as lcid',
(int) 7 => 'c.slug',
(int) 8 => 'sc.slug',
(int) 9 => 'lc.slug'
)
)
- APP/Controller/LocationsController.php line 45 → LocationsController->_getSignupCategories(string, string)
//$city = $this->decSlug($city);
$this->set('pt',$province);
$this->set('cname',$city);
$signup_categories = $this->_getSignupCategories($province,$city);
$this->set('data',$signup_categories);
- [internal function] → LocationsController->view(string, string)
- CORE/Cake/Controller/Controller.php line 490 → ReflectionMethod->invokeArgs(LocationsController, array)
'action' => $request->params['action']
));
}
return $method->invokeArgs($this, $request->params['pass']);
object(LocationsController) {
components => array(
[maximum depth reached]
)
helpers => array(
[maximum depth reached]
)
name => 'Locations'
uses => array(
[maximum depth reached]
)
request => object(CakeRequest) {}
response => object(CakeResponse) {}
viewPath => 'Locations'
layoutPath => null
viewVars => array(
[maximum depth reached]
)
view => 'view'
layout => 'search'
autoRender => true
autoLayout => true
Components => object(ComponentCollection) {}
viewClass => 'View'
View => null
ext => '.ctp'
plugin => null
cacheAction => false
passedArgs => array(
[maximum depth reached]
)
scaffold => false
methods => array(
[maximum depth reached]
)
modelClass => 'Location'
modelKey => 'location'
validationErrors => null
Session => object(SessionComponent) {}
Paginator => object(PaginatorComponent) {}
Province => object(Province) {}
SignupsCategories => object(AppModel) {}
[protected] _responseClass => 'CakeResponse'
[protected] _mergeParent => 'AppController'
[protected] _eventManager => object(CakeEventManager) {}
}
array(
(int) 0 => 'QC',
(int) 1 => 'messines'
)
- CORE/Cake/Routing/Dispatcher.php line 191 → Controller->invokeAction(CakeRequest)
$response = $controller->response;
$render = true;
$result = $controller->invokeAction($request);
if ($result instanceof CakeResponse) {
object(CakeRequest) {
params => array(
[maximum depth reached]
)
data => array([maximum depth reached])
query => array(
[maximum depth reached]
)
url => 'ca/locations/QC/messines'
base => ''
webroot => '/'
here => '/ca/locations/QC/messines'
[protected] _detectors => array(
[maximum depth reached]
)
[protected] _input => ''
}
- CORE/Cake/Routing/Dispatcher.php line 165 → Dispatcher->_invoke(LocationsController, CakeRequest)
));
}
$response = $this->_invoke($controller, $request);
if (isset($request->params['return'])) {
object(LocationsController) {
components => array(
[maximum depth reached]
)
helpers => array(
[maximum depth reached]
)
name => 'Locations'
uses => array(
[maximum depth reached]
)
request => object(CakeRequest) {}
response => object(CakeResponse) {}
viewPath => 'Locations'
layoutPath => null
viewVars => array(
[maximum depth reached]
)
view => 'view'
layout => 'search'
autoRender => true
autoLayout => true
Components => object(ComponentCollection) {}
viewClass => 'View'
View => null
ext => '.ctp'
plugin => null
cacheAction => false
passedArgs => array(
[maximum depth reached]
)
scaffold => false
methods => array(
[maximum depth reached]
)
modelClass => 'Location'
modelKey => 'location'
validationErrors => null
Session => object(SessionComponent) {}
Paginator => object(PaginatorComponent) {}
Province => object(Province) {}
SignupsCategories => object(AppModel) {}
[protected] _responseClass => 'CakeResponse'
[protected] _mergeParent => 'AppController'
[protected] _eventManager => object(CakeEventManager) {}
}
object(CakeRequest) {
params => array(
[maximum depth reached]
)
data => array([maximum depth reached])
query => array(
[maximum depth reached]
)
url => 'ca/locations/QC/messines'
base => ''
webroot => '/'
here => '/ca/locations/QC/messines'
[protected] _detectors => array(
[maximum depth reached]
)
[protected] _input => ''
}
- APP/webroot/index.php line 108 → Dispatcher->dispatch(CakeRequest, CakeResponse)
$Dispatcher->dispatch(
new CakeRequest(),
new CakeResponse()
);
object(CakeRequest) {
params => array(
[maximum depth reached]
)
data => array([maximum depth reached])
query => array(
[maximum depth reached]
)
url => 'ca/locations/QC/messines'
base => ''
webroot => '/'
here => '/ca/locations/QC/messines'
[protected] _detectors => array(
[maximum depth reached]
)
[protected] _input => ''
}
object(CakeResponse) {
[protected] _statusCodes => array(
[maximum depth reached]
)
[protected] _mimeTypes => array(
[maximum depth reached]
)
[protected] _protocol => 'HTTP/1.1'
[protected] _status => (int) 200
[protected] _contentType => 'text/html'
[protected] _headers => array([maximum depth reached])
[protected] _body => null
[protected] _file => null
[protected] _fileRange => null
[protected] _charset => 'UTF-8'
[protected] _cacheDirectives => array([maximum depth reached])
[protected] _cookies => array([maximum depth reached])
}