I'm developing CakePHP based application, on WAMP.
For some reason I cannot run cake bake anymore.
After I run command:
c:\Program Files\wamp\www\my-application>"c:\Program Files\wamp\www\cakephp-246 0\app\Console\cake.bat" bake
... I'm getting following error:
Welcome to CakePHP v2.4.6 Console
---------------------------------------------------------------
App : my-application
Path: c:\Program Files\wamp\www\my-application\
---------------------------------------------------------------
---------------------------------------------------------------
Bake Model
Path: c:\Program Files\wamp\www\my-application\Model\
---------------------------------------------------------------
Error: Database connection "Mysql" is missing, or could not be created.
#0 C:\Program Files\wamp\www\cakephp-2460\lib\Cake\Model\ConnectionManager.php(1
05): DboSource->__construct(Array)
#1 C:\Program Files\wamp\www\cakephp-2460\lib\Cake\Console\Command\Task\ModelTas
k.php(927): ConnectionManager::getDataSource('default')
#2 C:\Program Files\wamp\www\cakephp-2460\lib\Cake\Console\Command\Task\ModelTas
k.php(864): ModelTask->getAllTables(NULL)
#3 C:\Program Files\wamp\www\cakephp-2460\lib\Cake\Console\Command\Task\ModelTas
k.php(954): ModelTask->listAll(NULL)
#4 C:\Program Files\wamp\www\cakephp-2460\lib\Cake\Console\Command\Task\ModelTas
k.php(203): ModelTask->getName()
#5 C:\Program Files\wamp\www\cakephp-2460\lib\Cake\Console\Command\Task\ModelTas
k.php(91): ModelTask->_interactive()
#6 C:\Program Files\wamp\www\cakephp-2460\lib\Cake\Console\Shell.php(437): Model
Task->execute()
#7 C:\Program Files\wamp\www\cakephp-2460\lib\Cake\Console\Shell.php(434): Shell
->runCommand('execute', Array)
#8 C:\Program Files\wamp\www\cakephp-2460\lib\Cake\Console\ShellDispatcher.php(2
07): Shell->runCommand('model', Array)
#9 C:\Program Files\wamp\www\cakephp-2460\lib\Cake\Console\ShellDispatcher.php(6
6): ShellDispatcher->dispatch()
#10 C:\Program Files\wamp\www\cakephp-2460\app\Console\cake.php(36): ShellDispat
cher::run(Array)
#11 {main}
c:\Program Files\wamp\www\my-application>
It worked before. I think that problem started after PHP was upgraded.
I followed lot's of instructions like:
CakePHP Bake Shell Error: Database connection “Mysql” is missing, or could not be created
CakePHP Database connection "Mysql" is missing, or could not be created
CakePHP bake Error: Database connection "Mysql" is missing, or could not be created
... etc, but did not solved my problem.
I have to mention that my CakePHP application WORKS, and that only problem I have is that I cannot run any of cake bake options.
Console/cake -app c:\path\to\your\app\directory bake
. – bancer