Getting Cake PHP Installed

CakePHP Installation on Windows 2008 Shared Servers

Summary

These instructions are for installing CakePHP on a new site. CakePHP makes building web applications simpler, faster and require less code. Remember that you will be running PHP in a Windows environment so the Bake or Shells will not be available.

Assumptions

Also this KB assumes you know about PHP programming and that your plan supports Mod_Rewrite: see http://help.webcontrolcenter.com/KB/a784/which-hosting-plans-support-iis-mod-rewrite.aspx?KBSearchID=0 

If you are not on any of these, its time for you to upgrade. see:
http://help.webcontrolcenter.com/KB/a1484/how-to-change-hosting-plans.aspx?KBSearchID=0

Execution

First, download
CakePHP ( http://cakephp.org/) to your local machine and Upload via FTP. If you do not remember how to use FTP see: http://help.webcontrolcenter.com/KB/a523/how-do-i-setup-ftp-file-transfer-protocol-accounts.aspx?KBSearchID=0

Your standard
CakePHP layout should look like this:
 

Next, you should make sure you have your application pool set to 32bit (unless you need 64 bit to run other applications within your account )

by looking at :
http://help.webcontrolcenter.com/KB/a1465/application-pool-manager-how-to-recycle-your-app-pool.aspx?KBSearchID=0


You would need to create a file named
web.config in the root of your site and copy paste the following code is you are using a Windows 2008 Plan:

1.<?xml version="1.0" encoding="UTF-8"?>
2.<configuration>
3.    <system.webServer>
4.        <handlers>
5.            <add name="modrewrite" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\syswow64\inetsrv\imodrewi.dll" resourceType="Unspecified" requireAccess="None" preCondition="bitness32" />
6.        </handlers>
7.    </system.webServer>
8.</configuration>


Save it on the root of your site.


Now you need to change write / delete permissions with the apply permissions sub folders checked,  to EVERYONE on the following directories:
app/tmp and lib/cake/Cache/

For Permission changes see:
http://help.webcontrolcenter.com/KB/a1395/how-to-change-site-user-file-permissions-the.aspx?KBSearchID=0

Last step, copy
/app/config/database.php.default to just database.php it should look something like this:



If you navigate to your http://domain.com/index.php site you should see the default page which would more than likely tell you you are missing a controller and such, but you are ready to start programming away.




Prologue

You can follow the tutorial in
http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/blog.html to test out a working blog or read their API for more info. http://api.cakephp.org/




Add Feedback