Friday, November 30, 2012

Cake Bake on nginx

I just installed Cake from the command line

 

When I run the cake bake command

Welcome to CakePHP v2.2.3 Console

---------------------------------------------------------------

App : app

Path: /var/www/app/

---------------------------------------------------------------

Interactive Bake Shell

---------------------------------------------------------------

[D]atabase Configuration

[M]odel

[V]iew

[C]ontroller

[P]roject

[F]ixture

[T]est case

[Q]uit

What would you like to Bake? (D/M/V/C/P/F/T/Q)

 

Select M and this is the result.

 

Error: Database connection "Mysql" is missing, or could not be created.

#0 /usr/share/php/Cake/Model/ConnectionManager.php(101): DboSource->__construct(Array)

#1 /usr/share/php/Cake/Console/Command/Task/ModelTask.php(908): ConnectionManager::getDataSource('default')

#2 /usr/share/php/Cake/Console/Command/Task/ModelTask.php(845): ModelTask->getAllTables (NULL)

#3 /usr/share/php/Cake/Console/Command/Task/ModelTask.php(934): ModelTask->listAll(NULL )

#4 /usr/share/php/Cake/Console/Command/Task/ModelTask.php(204): ModelTask->getName()

#5 /usr/share/php/Cake/Console/Command/Task/ModelTask.php(92): ModelTask->_interactive()

#6 /usr/share/php/Cake/Console/Command/BakeShell.php(107): ModelTask->execute()

#7 /usr/share/php/Cake/Console/Shell.php(393): BakeShell->main()

#8 /usr/share/php/Cake/Console/ShellDispatcher.php(201): Shell->runCommand(NULL, Array)

#9 /usr/share/php/Cake/Console/ShellDispatcher.php(69): ShellDispatcher->dispatch()

#10 /usr/bin/cake.php(43): ShellDispatcher::run(Array)

#11 {main}

 

The site is running on the server I just need to bake new models / controllers.

 

I did install php-pdo module but that did nothing.

 

Any nginx users out there who came across same issue?

 

Thanks

No comments: