You are on page 1of 4

Running CakePHP Command Line Tools in Windows 1.

Open Computer under your Windows Start menu

. Rig!t"#li#k t!e Computer window$ and sele#t Properties %. &ou will 'e 'roug!t to t!e Control Panel(s System window. We(ll need to #!ange our en)ironment )aria'les under *d)an#ed System Settings$ w!i#! you #an sele#t +rom t!e le+t #olumn menu in t!is window ,. Sele#t t!e *d)an#ed ta' on t!e System Properties window -. Cli#k t!e .n)ironment /aria'les0 'utton 1. 2n t!e System /aria'les 'o3$ +ind t!e Pat! )aria'le and #li#k .dit0 4. 2+ t!ere isn(t one already$ add a semi#olon to t!e end o+ t!e #urrent Pat! )aria'le 5a semi#olon is used to separate )aria'les6 2 use W*7P as my lo#al de)elopment en)ironment$ and store all o+ my CakePHP pro8e#ts in t!e C9:wamp:www dire#tory$ so my pat! )aria'les will re+er to t!is wamp dire#tory. 7y CakePHP pro8e#t also resides in a dire#tory named order;system. &ours may di++er depending on your de)elopment en)ironment and w!ere you !a)e CakePHP installed$ so 'e sure to #!ange t!ese dire#tories to +it your needs <. *t t!e end o+ your Pat! )aria'le add #9:wamp:'in:p!p:p!p-.%.<:=#9:wamp:www:order;system:app:Console:= 5T!e +irst pat! s!ould point to your installation o+ PHP$ and se#ond )aria'le s!ould point to t!e app:Console lo#ation o+t!e pro8e#t t!at you are de)eloping6 >. Cli#k O? to sa)e your #!anges. On#e t!e Pat! )aria'les !a)e 'een sa)ed$ we #an run a test to 'e sure t!at t!e )aria'les are pointing to t!e appropriate lo#ations 1. @rom t!e Windows Start menu$ sear#! +or Run

. 2n t!e Run prompt$ type #md.e3e to e3e#ute t!e Windows #ommand line #onsole %. &our #ommand line #onsole will likely 'e pointing to your Aser dire#tory initially. Type #ake at t!e prompt. 2+ your en)ironment )aria'les are #orre#t$ you s!ould see a Wel#ome to CakePHP Console message$ similar to9

CakePHP #ommand #onsole is working properly$ 'ut it will need to run wit!in our CakePHP pro8e#t. *s you #an see +rom t!e s#reens!ot$ our working pat! s!ould 'e t!e same as our appli#ation pat!. 2n order to re#ti+y t!is$ simply use t!e C!ange Bire#tory 5#d6 #ommand to #!ange t!e pat! to t!e app +older inside your CakePHP pro8e#t9 #d #9:wamp:www:order;system:app Cow t!at we are in t!e #orre#t dire#tory$ we #an instru#t CakePHP to 'ake our pro8e#t$ simply 'y typing at t!e prompt9 #ake 'ake

*lternati)ely$ you #an skip t!e 'ake menu$ and 8ump rig!t into 'aking a #ontroller$ pro8e#t$ )iew$ et#. 'y running any o+ t!ese #ommands at t!e #ommand line9 #ake 'ake d';#on+ig #ake 'ake model #ake 'ake )iew #ake 'ake #ontroller #ake 'ake pro8e#t #ake 'ake +i3ture #ake 'ake test #ake 'ake plugin plugin;name #ake 'ake all @or e3ample$ instead o+ entering #ake 'ake a+ter #!anging to your pro8e#t dire#tory$ enter #ake 'ake #ontroller