Fury
Fury

Reputation: 4776

'php' or 'cake', 'bake' is not recognized as an internal or external command + cakephp

I ant to back some stuff. but unfortunately cake bake doesn't work.

I get this in console:

'php' or 'cake' is not recognized as an internal or external command

Upvotes: 1

Views: 7901

Answers (2)

Fury
Fury

Reputation: 4776

Right click on MyComputer /

properties/

Advance system settings/

Environment Variables /

system variables part/

select path

-> edit -> add this to the path

Cakephp 2.x

  • C:\wamp\www\Name_of_cake_folder\app\Console;
  • C:\wamp\bin\php\php5.4.12 or php version

Cakephp 3.x

  • C:\wamp\www\Name_of_cake_folder\bin;

  • C:\wamp\bin\php\php5.4.12 or php version

Note: Make sure there is no space between paths

Upvotes: 4

AD7six
AD7six

Reputation: 66169

If php isn't in your path, it is of course appropriate to add it.

Use Console/cake

However, it's not necessary to have cake in your include path (or IMO a good idea). In version 1.x it was the preferred/recommended way to access CakePHP's cli but not any more.

Instead of using an executable in your path, use the executable for whichever application is most relevant:

cd some\app
Console\Cake

Welcome to Cakephp v.....
-------------------------

This also avoids problems where multiple applications are installed using different versions of CakePHP.

Upvotes: 2

Related Questions