It’s actually quite simple to set up cakePHP with Mac OS X because most of the functionality you need comes already shipped with your system. Therefore I’m showing here how to use as much of the built in software such as Apache as possible to get cake up and running. Of course, alternatively you could use a local development environment such as MAMP. But why bother with an additional piece of software when Apache & PHP are already integrated in your Mac? And also you have greater flexibility when it comes to using virtual hosts (unless you buy the Pro version of MAMP). I recommend to give it a try - it’s not that hard: just follow these steps:
Prepare your Mac with Apache, PHP and MySQL
Warning (512): /.../app/tmp/cache/ is not writable
To fix this you have to make the cache directory writeable. In fact you should make the whole tmp directory writeable. Go to your app/tmp directory and change the read/write permissions for “everyone” to read & write (do this for all subfolders as well using the option just below the permissions field).
Notice (1024): Please change the value of 'Security.salt'...
For this just go to your app/config/core.php file and change the value of the string where it says:
and change the value of the string to something else. The length doesn’t matter, but I recommend to keep it this length and also in this form (random).
Your database configuration file is NOT present.
To configure the database rename the file database.php.default to database.php and set the parameters in it according to your setup. E.g. you can add a new user with a new database using phpMyAdmin and set those values in the database.php
Now all error messages should be gone. But there is still one thing to do - the design is not working as it is plain text only and the CSS does not seem to load. To fix this we need to set the DocumentRoot of Apache to the /app/webroot directory. To do this we have to define a virtual host and the corresponding DocumentRoot. How to do this is explained here again. Just extend the path of the virtual server with /app/webroot in your username.conf as shown in the guide and things should work. Don’t forget to restart your Apache (by deactivating and activating the Web-Sharing in your control panel) for the changes to take effect!
And then… there is actually one more last thing. Apache on Mac OS X is by default configured not to work with .htaccess files! That’s something we have to change in order to get cakePHP to work. And because we have a virtual server environment set up we can do this in the username.conf file again. Add the following bold lines of code for every virtual host definition:
Options Indexes FollowSymLinks
Now everything should be set up! If anything was unclear please comment on this post - I’ll try to answer your questions and/or improve the describtions!