CakePHP – Basics on MacOSX

As I was playing along with CakePHP on my machine, I noticed that it took me some extra steps to configure it correctly on my Mac machine, unlike in Windows that is fairly very straight forward.

First the cake core console configuration on the system path – You need to define the cake core first on the classpath, this will allow the user / developer to call the cake and bake commands from the terminal.

Download CakePHP and put it under your Server Document Root (you can configure this on httpd.conf of you web server)

Open console and type: nano .bash_profile

This will open a console base text editor and .bash_profile file – note that the bash_profile is one of the recognized system classpath file in which users can declare console classpath (libraries). Now include the cake bin folder as shown on the screen.

export PATH=/Applications/MAMP/Library/bin:/Applications/MAMP/bin/php/bin:/Users/alvinreyes/EclipseProjects/PHP/cake/lib/Cake/Console:/opt/local/bin:/opt/local/sbin:/opt/subversion/bin:$PATH

Save, close the terminal and re-launch. Type in cake bake on the terminal

You are ready to bake your first application! Follow through the instructions and answer the simple questions that command asks and your good to go!

Once you create the Application Structure, you can now maximize the bake – code generation tool for generating the models, controllers and views.

Further Reference:


2 thoughts on “CakePHP – Basics on MacOSX

  1. I got this web site from my friend who shared
    with me regarding this web site and at the moment this time I am visiting this website
    and reading very informative posts at this time.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s