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 such file or directory
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 262 → Mysql->connect()
));
}
if ($autoConnect) {
$this->connect();
}
- CORE/Cake/Model/ConnectionManager.php line 102 → DboSource->__construct(array)
$conn = self::$_connectionsEnum[$name];
$class = $conn['classname'];
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/Behavior/TranslateBehavior.php line 68 → ConnectionManager::getDataSource(string)
* @return mixed
*/
public function setup(Model $Model, $config = array()) {
$db = ConnectionManager::getDataSource($Model->useDbConfig);
if (!$db->connected) {
- CORE/Cake/Model/BehaviorCollection.php line 150 → TranslateBehavior->setup(Link, array)
$config = array();
}
$this->_loaded[$alias]->settings['priority'] = $priority;
$this->_loaded[$alias]->setup(ClassRegistry::getObject($this->modelName), $config);
object(Link) {
actsAs => array(
[maximum depth reached]
)
displayField => 'name'
belongsTo => array(
[maximum depth reached]
)
cdata => array([maximum depth reached])
getData => array([maximum depth reached])
useDbConfig => 'default'
useTable => 'links'
id => false
data => array([maximum depth reached])
schemaName => null
table => 'links'
primaryKey => 'id'
validate => array([maximum depth reached])
validationErrors => array([maximum depth reached])
validationDomain => null
plugin => null
name => 'Link'
alias => 'Link'
tableToModel => array(
[maximum depth reached]
)
cacheQueries => false
hasOne => array([maximum depth reached])
hasMany => array([maximum depth reached])
hasAndBelongsToMany => array([maximum depth reached])
Behaviors => object(BehaviorCollection) {}
whitelist => array([maximum depth reached])
cacheSources => true
findQueryType => 'all'
recursive => (int) 1
order => null
virtualFields => array([maximum depth reached])
__backAssociation => array([maximum depth reached])
__backInnerAssociation => array([maximum depth reached])
__backOriginalAssociation => array([maximum depth reached])
__backContainableAssociation => array([maximum depth reached])
findMethods => array(
[maximum depth reached]
)
[protected] _schema => null
[protected] _associationKeys => array(
[maximum depth reached]
)
[protected] _associations => array(
[maximum depth reached]
)
[protected] _insertID => null
[protected] _sourceConfigured => true
[protected] _eventManager => object(CakeEventManager) {}
[protected] _validator => null
}
array(
'name' => 'Translation_name'
)
- CORE/Cake/Model/BehaviorCollection.php line 68 → BehaviorCollection->load(string, array)
if (!empty($behaviors)) {
foreach (BehaviorCollection::normalizeObjectArray($behaviors) as $config) {
$this->load($config['class'], $config['settings']);
}
'Translate'
array(
'name' => 'Translation_name'
)
- CORE/Cake/Model/Model.php line 749 → BehaviorCollection->init(string, array)
}
$this->_createLinks();
$this->Behaviors->init($this->alias, $this->actsAs);
}
'Link'
array(
'Translate' => array(
'name' => 'Translation_name'
)
)
- [internal function] → Model->__construct(array)
array(
'class' => 'Link',
'alias' => 'Link',
'id' => null
)
- CORE/Cake/Utility/ClassRegistry.php line 165 → ReflectionClass->newInstance(array)
}
}
if ($reflection->getConstructor()) {
$instance = $reflection->newInstance($settings);
} else {
array(
'class' => 'Link',
'alias' => 'Link',
'id' => null
)
- CORE/Cake/Controller/Controller.php line 734 → ClassRegistry::init(array)
$this->{$modelClass} = ClassRegistry::init(array(
'class' => $plugin . $modelClass, 'alias' => $modelClass, 'id' => $id
));
if (!$this->{$modelClass}) {
array(
'class' => 'Link',
'alias' => 'Link',
'id' => null
)
- APP/Controller/AppController.php line 309 → Controller->loadModel(string)
$this->set('balance',$balance);
$this->loadModel('Link');
$mlinks = $this->Link->find('all');
- APP/Controller/UsersController.php line 20 → AppController->beforeFilter()
*/
public function beforeFilter()
{
parent::beforeFilter();
$this->Auth->allow('login','add','resetpassword','forgetpassword','loginwith', 'entermail');
- [internal function] → UsersController->beforeFilter(CakeEvent)
object(CakeEvent) {
data => null
result => null
[protected] _name => 'Controller.initialize'
[protected] _subject => object(UsersController) {}
[protected] _stopped => false
}
- CORE/Cake/Event/CakeEventManager.php line 248 → call_user_func(array, CakeEvent)
if ($listener['passParams'] === true) {
$result = call_user_func_array($listener['callable'], $event->data);
} else {
$result = call_user_func($listener['callable'], $event);
}
array(
(int) 0 => object(UsersController) {},
(int) 1 => 'beforeFilter'
)
object(CakeEvent) {
data => null
result => null
[protected] _name => 'Controller.initialize'
[protected] _subject => object(UsersController) {}
[protected] _stopped => false
}
- CORE/Cake/Controller/Controller.php line 670 → CakeEventManager->dispatch(CakeEvent)
* @return void
*/
public function startupProcess() {
$this->getEventManager()->dispatch(new CakeEvent('Controller.initialize', $this));
$this->getEventManager()->dispatch(new CakeEvent('Controller.startup', $this));
object(CakeEvent) {
data => null
result => null
[protected] _name => 'Controller.initialize'
[protected] _subject => object(UsersController) {}
[protected] _stopped => false
}
- CORE/Cake/Routing/Dispatcher.php line 184 → Controller->startupProcess()
*/
protected function _invoke(Controller $controller, CakeRequest $request, CakeResponse $response) {
$controller->constructClasses();
$controller->startupProcess();
- CORE/Cake/Routing/Dispatcher.php line 162 → Dispatcher->_invoke(UsersController, CakeRequest, CakeResponse)
));
}
$response = $this->_invoke($controller, $request, $response);
if (isset($request->params['return'])) {
object(UsersController) {
components => array(
[maximum depth reached]
)
helpers => array(
[maximum depth reached]
)
name => 'Users'
uses => array(
[maximum depth reached]
)
request => object(CakeRequest) {}
response => object(CakeResponse) {}
viewPath => 'Users'
layoutPath => null
viewVars => array(
[maximum depth reached]
)
view => 'login'
layout => 'login'
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 => 'User'
modelKey => 'user'
validationErrors => null
Acl => object(AclComponent) {}
Auth => object(AuthComponent) {}
Session => object(SessionComponent) {}
Recaptcha => object(RecaptchaComponent) {}
Password => object(PasswordComponent) {}
Thumb => object(ThumbComponent) {}
Email => object(EmailComponent) {}
CurrencyConverter => object(CurrencyConverterComponent) {}
[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 => 'users/login'
base => ''
webroot => '/'
here => '/users/login'
[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] _charset => 'UTF-8'
[protected] _cacheDirectives => array([maximum depth reached])
[protected] _cookies => array([maximum depth reached])
}
- APP/webroot/index.php line 109 → 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 => 'users/login'
base => ''
webroot => '/'
here => '/users/login'
[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] _charset => 'UTF-8'
[protected] _cacheDirectives => array([maximum depth reached])
[protected] _cookies => array([maximum depth reached])
}