Troubleshooting your cakePhp installation
If your a first timer installing cakePhp, it's quite annoying if your not getting it to work. Really, I've seen people take up to 3 days just installing it because they don't know what the problem is. The common problem I've seen is usually a mod_rewrite issue. If your installing an application made in cakePhp and can't make it work, I suggest the ffg:
1. Get the most recent stable version from cakephp.org and follow the instructions from the Manual Section 3. Install it in a subfolder. You can always move it somewhere else after the installation. Let's say the subfolder name is /mycake. Also make sure to change the permission to /app/tmp
2. After running it, see if the page is a bit colorful. If yes, then go to the next step. If not, check the src of the <link> tag. The link tag should most likely look like this
<link src="/mycake/css/style.css">
If the src is only "/css/style.css", then I bet you have a mod_rewrite problem. Check your apache configuration. For windows, I believe it is named httpd.conf and most likely it was just commented out in the list of modules so look for the word mod_rewrite. In ubuntu, most likely it is in the /ect/apache2/, I don't know in other distros. I can't give much info in troubleshooting it in ubuntu or linux, there could be a couple of ways. After successfully doing so, remember to restart your apache and check again. Don't stop until you see those colors. Go to the next step afterwards.
3. You can stop right here. The ffg step is just for me to verify that no doubt the installation works. Proceed if you like.
Create a simple controller with the ffg content:
-
var $uses = null // so you dont have to use a model
-
function index() {}
Then create your view named index.thtml (im using the 1.1 version). If that successfully loaded, congratulations! You have verified your installation successful. If not, then tell me about it.
Another problem I experienced before when installing this in a server is the "new installation of cake: open_basedir restriction error". Basically, here are the solutions:
1. Hack the core. Change the fileExistsInPath (located in /cake/basics.php) function to:
-
function fileExistsInPath($file) {
-
// removing /usr/share/pear from the list of includes_path
-
// the rest goes here
-
}
2. .htaccess config. Add the ffg lines to your .htaccess so that the php include_path doesn’t have all the extra stuff you don’t need:
-
php_value include_path
Read more info here.
For IIS installation, I just found this help . If you have other experience, write about it or add a comment and let us all know.





