How to bake on Ubuntu using cakePHP
Today I started a new project that I’m developing for school and I thought I’d do it using cakePHP.
I went ahead and downloaded xampp for linux and a fresh copy of the cakePHP framework, 1.3.0-RC3, and I extracted it to my webroot. After I created a virtual host for it, it was time to get baking. I tried using the console but it seemed that I wasn’t done installing the framework just yet.
Under Ubuntu you need to install cakephp-scripts using this command:
sudo apt-get install cakephp-scripts
otherwise you will get an error similar to this one
./cake: line 30: exec: php: not found
After you’ve installed the cakephp-scripts, it’s time to update your system path to include the cake script. I did this using the gedit editor under Ubuntu. So, open a terminal and type:
sudo gedit /etc/environment &
and you should see the PATH variable like this
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:"
We must update the PATH as follows
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/lampp/bin:/opt/lampp/htdocs/cakephp/cake/console"
As you can see, the paths are separated by ‘:’. You should replace the paths as are those on your system. Save the file and exit gedit.
After you’ve done this, you should be able to run cake from you console like this
in-sanity@in-sanity-laptop:~$ cake Welcome to CakePHP v1.2.3.8166 Console --------------------------------------------------------------- Current Paths: -app: in-sanity -working: /home/in-sanity -root: /home -core: /usr/share/php Changing Paths: your working path should be the same as your application path to change your path use the '-app' param. Example: -app relative/path/to/myapp or -app /absolute/path/to/myapp Available Shells: CORE/console/libs: acl api bake console i18n schema testsuite To run a command, type 'cake shell_name [args]' To get help on a specific command, type 'cake shell_name help'
Success. Happy baking.
Related posts
- How to switch between databases in CakePHP on the fly
- Custom URL for CakePHP Paginator helper
- Alertpay integration with CakePHP
- How to paginate search results in CakePHP
- Update grub menu after kernel updates on Ubuntu 9.10
- How to fix unbootable Windows from the Recovey Console
- Ubuntu saved me once again
- Recover your Ubuntu root password
- Fix for wireless connection stability problem after update on Ubuntu 9.10
![[del.icio.us]](http://insanityville.com/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://insanityville.com/wp-content/plugins/bookmarkify/digg.png)
![[diigo]](http://insanityville.com/wp-content/plugins/bookmarkify/diigo.png)
![[Facebook]](http://insanityville.com/wp-content/plugins/bookmarkify/facebook.png)
![[Friendsite]](http://insanityville.com/wp-content/plugins/bookmarkify/friendsite.png)
![[LinkedIn]](http://insanityville.com/wp-content/plugins/bookmarkify/linkedin.png)
![[Reddit]](http://insanityville.com/wp-content/plugins/bookmarkify/reddit.png)
![[Simpy]](http://insanityville.com/wp-content/plugins/bookmarkify/simpy.png)
![[Slashdot]](http://insanityville.com/wp-content/plugins/bookmarkify/slashdot.png)
![[StumbleUpon]](http://insanityville.com/wp-content/plugins/bookmarkify/stumbleupon.png)
![[Twitter]](http://insanityville.com/wp-content/plugins/bookmarkify/twitter.png)
![[Email]](http://insanityville.com/wp-content/plugins/bookmarkify/email.png)



5 Responses
to “How to bake on Ubuntu using cakePHP”





Great tutorial. Any suggestions on good books for getting started with CakePHP? I’ve done a little web development but never worked with a MVC framework before.
Thanks.
Hi,
The best place to start is the CakePHP official documentation. Thanks for your appreciation.
you just made today more awesome. thank you.
I feel good too. Thanks.
[...] the original post: Insanityville – How to bake on Ubuntu using cakePHP – Reviews … If you enjoyed this article please consider sharing [...]