Database connection "Mysql" is missing, or could not be created.
Error:
An Internal Error Has Occurred.
Stack Trace
- APP/cakephp/lib/Cake/Model/Datasource/DboSource.php line 262 → Mysql->connect()
));
}
if ($autoConnect) {
$this->connect();
}
- APP/cakephp/lib/Cake/Model/ConnectionManager.php line 107 → 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' => true,
'encoding' => 'utf8'
)
- APP/cakephp/lib/Cake/Model/Model.php line 3288 → ConnectionManager::getDataSource(string)
if ($dataSource) {
$this->useDbConfig = $dataSource;
}
$db = ConnectionManager::getDataSource($this->useDbConfig);
if (!empty($oldConfig) && isset($db->config['prefix'])) {
- APP/cakephp/lib/Cake/Model/Model.php line 1107 → Model->setDataSource(string)
* @return void
*/
public function setSource($tableName) {
$this->setDataSource($this->useDbConfig);
$db = ConnectionManager::getDataSource($this->useDbConfig);
- APP/cakephp/lib/Cake/Model/Model.php line 3310 → Model->setSource(string)
public function getDataSource() {
if (!$this->_sourceConfigured && $this->useTable !== false) {
$this->_sourceConfigured = true;
$this->setSource($this->useTable);
}
- APP/cakephp/lib/Cake/Model/Model.php line 799 → Model->getDataSource()
if ($result !== array('unhandled')) {
return $result;
}
$return = $this->getDataSource()->query($method, $params, $this);
return $return;
- APP/Model/User.php line 171 → Model->__call(string, array)
}
$userId = $session->read('userId');
if ($userId >= 0) {
$user = $this->findById($userId);
if ($user) {
'findById'
array(
(int) 0 => null
)
- APP/Model/User.php line 171 → User->findById(null)
}
$userId = $session->read('userId');
if ($userId >= 0) {
$user = $this->findById($userId);
if ($user) {
- APP/Controller/AppController.php line 142 → User->readSession(SessionComponent)
}
$keyUserId = $this->__checkKey();
$user = $this->User->readSession($this->Session);
if ($user && $user['User']['id'] >= 0 && $keyUserId == $user['User']['id']) {
object(SessionComponent) {
settings => array([maximum depth reached])
components => array([maximum depth reached])
[protected] _Collection => object(ComponentCollection) {}
[protected] _componentMap => array([maximum depth reached])
}
- APP/Controller/AppController.php line 37 → AppController->__checkSession()
$this->Cookie->name = 'phtagr';
$this->Cookie->type('rijndael');
$this->__checkSession();
$this->Feed->add('/explorer/rss', array('title' => __('Recent photos')));
- APP/Controller/ImagesController.php line 27 → AppController->beforeFilter()
var $crumbs = array();
public function beforeFilter() {
parent::beforeFilter();
$this->logUser();
- [internal function] → ImagesController->beforeFilter(CakeEvent)
object(CakeEvent) {
data => null
result => null
[protected] _name => 'Controller.initialize'
[protected] _subject => object(ImagesController) {}
[protected] _stopped => false
}
- APP/cakephp/lib/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(ImagesController) {},
(int) 1 => 'beforeFilter'
)
object(CakeEvent) {
data => null
result => null
[protected] _name => 'Controller.initialize'
[protected] _subject => object(ImagesController) {}
[protected] _stopped => false
}
- APP/cakephp/lib/Cake/Controller/Controller.php line 674 → 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(ImagesController) {}
[protected] _stopped => false
}
- APP/cakephp/lib/Cake/Routing/Dispatcher.php line 184 → Controller->startupProcess()
*/
protected function _invoke(Controller $controller, CakeRequest $request, CakeResponse $response) {
$controller->constructClasses();
$controller->startupProcess();
- APP/cakephp/lib/Cake/Routing/Dispatcher.php line 162 → Dispatcher->_invoke(ImagesController, CakeRequest, CakeResponse)
));
}
$response = $this->_invoke($controller, $request, $response);
if (isset($request->params['return'])) {
object(ImagesController) {
name => 'Images'
components => array(
[maximum depth reached]
)
uses => array(
[maximum depth reached]
)
helpers => array(
[maximum depth reached]
)
crumbs => array([maximum depth reached])
request => object(CakeRequest) {}
response => object(CakeResponse) {}
viewPath => 'Images'
layoutPath => null
viewVars => array([maximum depth reached])
view => 'view'
layout => 'default'
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 => 'Media'
modelKey => 'image'
validationErrors => null
Session => object(SessionComponent) {}
Cookie => object(CookieComponent) {}
Feed => object(FeedComponent) {}
RequestHandler => object(RequestHandlerComponent) {}
Menu => object(MenuComponent) {}
Search => object(SearchComponent) {}
FastFileResponder => object(FastFileResponderComponent) {}
User => object(User) {}
[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 => 'images/view/1216/category:%D0%94%D0%BE%D0%B1%D1%80%D0%BE%D0%B2%D0%BE%D0%BB%D1%8C%D1%87%D0%B5%D1%81%D1%82%D0%B2%D0%BE/sort:viewed/pos:120'
base => ''
webroot => '/'
here => '/images/view/1216/category:%D0%94%D0%BE%D0%B1%D1%80%D0%BE%D0%B2%D0%BE%D0%BB%D1%8C%D1%87%D0%B5%D1%81%D1%82%D0%B2%D0%BE/sort:viewed/pos:120'
[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])
}
- APP/webroot/index.php line 143 → 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 => 'images/view/1216/category:%D0%94%D0%BE%D0%B1%D1%80%D0%BE%D0%B2%D0%BE%D0%BB%D1%8C%D1%87%D0%B5%D1%81%D1%82%D0%B2%D0%BE/sort:viewed/pos:120'
base => ''
webroot => '/'
here => '/images/view/1216/category:%D0%94%D0%BE%D0%B1%D1%80%D0%BE%D0%B2%D0%BE%D0%BB%D1%8C%D1%87%D0%B5%D1%81%D1%82%D0%B2%D0%BE/sort:viewed/pos:120'
[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])
}