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

时间:2013-08-16 09:17:40

标签: cakephp

我试图设置我的cakePHP,所有其他消息都很好,但我无法修复标题中显示的错误

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

在此错误消息中

PDO :: _ construct() - [internal],line ??
Mysql :: connect() - CORE \ Cake \ Model \ Datasource \ Database \ Mysql.php,第162行 DboSource ::
_construct() - CORE \ Cake \ Model \ Datasource \ DboSource.php,第262行
ConnectionManager :: getDataSource() - CORE \ Cake \ Model \ ConnectionManager.php,第107行 包括 - APP \ View \ Pages \ home.ctp,第100行 View :: _ evaluate() - CORE \ Cake \ View \ View.php,第945行 View :: _ render() - CORE \ Cake \ View \ View.php,第907行 View :: render() - CORE \ Cake \ View \ View.php,第471行 Controller :: render() - CORE \ Cake \ Controller \ Controller.php,第948行 PagesController :: display() - APP \ Controller \ PagesController.php,第73行 ReflectionMethod :: invokeArgs() - [internal],line ??
Controller :: invokeAction() - CORE \ Cake \ Controller \ Controller.php,第486行 Dispatcher :: _ invoke() - CORE \ Cake \ Routing \ Dispatcher.php,第187行 Dispatcher :: dispatch() - CORE \ Cake \ Routing \ Dispatcher.php,第162行 [主要] - APP \ webroot \ index.php,第111行

可以帮助我一些,需要帮助>。<


database.php文件:

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 个答案:

答案 0 :(得分:0)

你在哪里得到蛋糕?您拥有的蛋糕文件本身可能存在错误。去http://cakephp.org/上的dl蛋糕而不是其他随机网站