0
votes

Im trying to set up my cakePHP, all the other messages are good but i cant fix this error showing in the title

PDO::__construct(): [CORE\Cake\Model\Datasource\Database\Mysql.php

inside this error message is

PDO::_construct() - [internal], line ??
Mysql::connect() - CORE\Cake\Model\Datasource\Database\Mysql.php, line 162
DboSource::
_construct() - CORE\Cake\Model\Datasource\DboSource.php, line 262
ConnectionManager::getDataSource() - CORE\Cake\Model\ConnectionManager.php, line 107
include - APP\View\Pages\home.ctp, line 100
View::_evaluate() - CORE\Cake\View\View.php, line 945
View::_render() - CORE\Cake\View\View.php, line 907
View::render() - CORE\Cake\View\View.php, line 471
Controller::render() - CORE\Cake\Controller\Controller.php, line 948
PagesController::display() - APP\Controller\PagesController.php, line 73
ReflectionMethod::invokeArgs() - [internal], line ??
Controller::invokeAction() - CORE\Cake\Controller\Controller.php, line 486
Dispatcher::_invoke() - CORE\Cake\Routing\Dispatcher.php, line 187
Dispatcher::dispatch() - CORE\Cake\Routing\Dispatcher.php, line 162
[main] - APP\webroot\index.php, line 111

can some1 help me please, need help >.<


database.php file:

class DATABASE_CONFIG { 
  public $default = array( 
    'datasource' => 'Database/Mysql', 
    'persistent' => false, 
    'host' => 'local', 
    'login' => 'CakeUser', 
    'password' => 'CakePassword', 
    'database' => 'CakeDB', 
    'prefix' => '', 
    //'encoding' => 'utf8', 
  ); 
  public $test = array( 
    'datasource' => 'Database/Mysql', 
    'persistent' => false, 
    'host' => 'localhost', 
    'login' => 'user', 
    'password' => 'password', 
    'database' => 'test_database_name', 
    'prefix' => '', 
    //'encoding' => 'utf8', ); 
} 
1
Where are you getting that? That looks like the stack trace rather than the actual error message.Martin Bean
when i go to localhost/cakephp to check if cakePHP is set up correctly.Daye Buchlor
Can you screen-shot the page? There should be a more helpful error message somewhere, rather than the stack trace.Martin Bean

1 Answers

0
votes

where did you get cake? the cake file you have may content error in itself. go dl cake on http://cakephp.org/ not some other random website