1

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
Fury
  • 4,643
  • 5
  • 50
  • 80

2 Answers2

4

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

Fury
  • 4,643
  • 5
  • 50
  • 80
2

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.

Community
  • 1
  • 1
AD7six
  • 63,116
  • 12
  • 91
  • 123