CakePHP蛋糕烘烤所有错误

时间:2012-03-30 13:08:11

标签: php mysql cakephp console

当我运行蛋糕烘焙时,我收到如下所示的错误消息。这是我的路吗?

Windows上的路径:

C:\wamp\bin\php\php5.3.5;C:\wamp\bin\mysql\mysql5.5.8\bin;C:\wamp\www\cakephp_bake\app\Console    

错误讯息:

 Welcome to CakePHP v2.0.6 Console
 ---------------------------------------------------------------
 App : www
 Path: C:\wamp\www\
 ---------------------------------------------------------------
 Bake All
 ---------------------------------------------------------------
 Warning Error: include_once(C:\wamp\www\Config\database.php): failed to open str
 eam: No such file or directory in [C:\wamp\www\cakephp_bake\lib\Cake\Model\Conne
 ctionManager.php, line 68]

 Warning Error: include_once(): Failed opening 'C:\wamp\www\Config\database.php'
 for inclusion (include_path='C:\wamp\www\cakephp_bake\lib;.;C:\php\pear') in [C:
 \wamp\www\cakephp_bake\lib\Cake\Model\ConnectionManager.php, line 68]

 Error: The datasource configuration "default" was not found in database.php
 #0 C:\wamp\www\cakephp_bake\lib\Cake\Model\ConnectionManager.php(94): Connection
 Manager::_getConnectionObject('default')
 #1 C:\wamp\www\cakephp_bake\lib\Cake\Console\Command\Task\ModelTask.php(862): Co
 nnectionManager::getDataSource('default')
 #2 C:\wamp\www\cakephp_bake\lib\Cake\Console\Command\Task\ModelTask.php(800): Mo
 delTask->getAllTables('default')
 #3 C:\wamp\www\cakephp_bake\lib\Cake\Console\Command\Task\ModelTask.php(888): Mo
 delTask->listAll('default')
 #4 C:\wamp\www\cakephp_bake\lib\Cake\Console\Command\BakeShell.php(149): ModelTa
 sk->getName('default')
 #5 C:\wamp\www\cakephp_bake\lib\Cake\Console\Shell.php(386): BakeShell->all()
 #6 C:\wamp\www\cakephp_bake\lib\Cake\Console\ShellDispatcher.php(177): Shell->ru
 nCommand('all', Array)
 #7 C:\wamp\www\cakephp_bake\lib\Cake\Console\ShellDispatcher.php(69): ShellDispa
 tcher->dispatch()
 #8 C:\wamp\www\cakephp_bake\app\Console\cake.php(41): ShellDispatcher::run(Array
 )
 #9 {main}

 C:\wamp\www>

如果我需要展示其他内容,请告诉我。感谢。

Stackoverflow不会允许我这么多代码所以我输入这句话让编辑器开心。

1 个答案:

答案 0 :(得分:1)

检查path是否错误!

将其更改为

C:\wamp\www\cakephp_bake\app\(即到你的app目录)

来自

C:\wamp\www\