Questions tagged [cake-console]

Console applications are ideal for handling a variety of background tasks such as maintenance, and completing work outside of the request-response cycle. CakePHP console applications allow you to reuse your application classes from the command line.

This section provides an introduction into CakePHP at the command-line. If you’ve ever needed access to your CakePHP MVC classes in a cron job or other command-line script, this section is for you.

Official Console Help.

8 questions
3
votes
2 answers

CakePHP console gives error "Undefined index: HTTP_HOST"

I have a setting in my APP/Config/config.php I have a line that defines the host: define('SITE_URL','http://'.$_SERVER['HTTP_HOST']); Whenever I run the cake console, I get the error: Notice (8): Undefined index: HTTP_HOST [APP/Config/config.php,…
mgPePe
  • 5,677
  • 12
  • 52
  • 85
2
votes
1 answer

cakephp console without prompt (-f option?)

Some CakeConsole commands (such as schema update) needs to confirm the operation by user. (Are you sure… messages) I want to use it under Puppet (automatic installation) so there is no actual user to enter yes for confirmation. Is there any option…
mrdaliri
  • 7,148
  • 22
  • 73
  • 107
0
votes
1 answer

Changing view file extension -via cake bake

Is there a way to change the extension of the view files generated by cake bake view? Presently, the task generates .ctp files -whereas I want .php. I tried using the alias argument @ cake bake view MyController index "index.php", however CakePHP…
jtrumbull
  • 818
  • 9
  • 19
0
votes
1 answer

Can't make ApiGenerator to work

I downloaded ApiGenerator from GitHub and pasted it inside app/Plugin/ApiGenerator, and edited the bootstrap to CakePlugin::load('ApiGenerator');. Then I wanted to do the next step, that is going to cake console and input the following line: cake…
Roberto Maldonado
  • 1,585
  • 14
  • 27
0
votes
1 answer

Cakephp installing Bake on Centos production server

I'm about to include cake in my path on my Centos production server and start using cake commands from the command line to manage my ACL framework. I looked around for notes on the potential hazards of having cake bake and also cake acl available on…
usumoio
  • 3,500
  • 6
  • 31
  • 57
0
votes
1 answer

How can I get CakePHP to use shell output level when loading Task on the fly

CakePHP version 2.3.8 If I use public $tasks = array('Email'); and $this->Email->execute(); the output level i.e. Console/cake Test --verbose will use verbose output in the Email task. But if I load the task on the fly using TaskCollection object it…
Corie Slate
  • 616
  • 9
  • 19
0
votes
1 answer

Cakephp Code Generation with bake

I have just downloaded cakephp latest version 2.3.0 and trying to create skeleton application using bake command. Problem is when I execute the command cake bake at /app>cake bake. Following message I am getting: Welcome to CakePHP v1.3.2…
Kam Paul
  • 111
  • 1
  • 6
0
votes
2 answers

Cake Console won't work on Mac OS X Lion

I just downloaded CakePHP 2.1 and did all the setup for the database and all the rest, but I'm unable to use the cake console, I get the following error: Error: Database connection "Mysql" is missing, or could not be created. If I open the site on…
8vius
  • 5,786
  • 14
  • 74
  • 136