Thursday, November 21, 2013

Re: Cakephp CLI error

Try


cd /path/to/cakephp/app
call console\cake bake all


2013/11/20 David Rochelet <drochelet@gmail.com>
Hi,

Seems you didn't configure your database.
Try this : http://book.cakephp.org/2.0/fr/console-and-shells/code-generation-with-bake.html

It is mentionned that you have first to create a  database.php file.

David


2013/11/20 Victor Musvibe <jaahvicky@gmail.com>
I am using cakephp 2.x and im trying Code Generation with Bake. When i try to cake bake all. Below are the errors i am getting in command line. 

I have posted this question on http://stackoverflow.com/questions/20079795/cakephp-cli-error , im just hoping to get a quicker response here.

I am using cakephp 2.x and im trying Code Generation with Bake. When i try to cake bake all. Below are the errors i am getting in command line.
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\victorm>cd c:\wamp\www\myappname\app\Console

c:\wamp\www\myappname\app\Console>cake bake all


Welcome to CakePHP v2.4.2 Console
---------------------------------------------------------------
App : Console
Path: c:\wamp\www\myappname\app\Console\
---------------------------------------------------------------
Bake All
---------------------------------------------------------------
Warning Error: include_once(c:\wamp\www\myappname\app\Console\Config\database.php): failed to open stream: No such file or directory in [C:\wamp\www\myappname\lib\Cake\Model\ConnectionManager.php, line 69]

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

Error: The datasource configuration "default" was not found in database.php
#0 C:\wamp\www\myappname\lib\Cake\Model\ConnectionManager.php(93): Connection
Manager::_getConnectionObject('default')
#1 C:\wamp\www\myappname\lib\Cake\Console\Command\Task\ModelTask.php(929): ConnectionManager::getDataSource('default')
#2 C:\wamp\www\myappname\lib\Cake\Console\Command\Task\ModelTask.php(866): ModelTask->getAllTables('default')
#3 C:\wamp\www\myappname\lib\Cake\Console\Command\Task\ModelTask.php(955): ModelTask->listAll('default')
#4 C:\wamp\www\myappname\lib\Cake\Console\Command\BakeShell.php(152): ModelTask->getName('default')
#5 C:\wamp\www\myappname\lib\Cake\Console\Shell.php(433): BakeShell->all()
#6 C:\wamp\www\myappname\lib\Cake\Console\ShellDispatcher.php(209): Shell->runCommand('all', Array)
#7 C:\wamp\www\myappname\lib\Cake\Console\ShellDispatcher.php(68): ShellDispatcher->dispatch()
#8 C:\wamp\www\myappname\app\Console\cake.php(37): ShellDispatcher::run(Array)
#9 {main}


c:\wamp\www\myappname\app\Console>

Does anyone have an idea on how to fix this?

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.



--
David ROCHELET

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.



--
***Se você pretende redirecionar este e-mail, por favor, apague todos os endereços que aparecem nele. Outra dica de segurança é endereçá-lo no Cco. Desta forma você estará protegendo a mim, seus amigos e a você mesmo. Eu e a Campanha Contra o SPAM agradecemos.Não envie correntes.***

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: