+ Reply to Thread
Results 1 to 4 of 4

Thread: CakePHP: Simple Installation Guide

  1. #1
    zeroark's Avatar
    zeroark is offline x10Hosting Member zeroark is an unknown quantity at this point
    Join Date
    Jan 2010
    Location
    Lima, Peru
    Posts
    28

    CakePHP: Simple Installation Guide

    Well, first of all this tutorial is intended for users that are just getting used to the .htaccess files. Maybe this tutorial won't be of much use for users who know how to control those files, but in any case, this might save some hours reading and searching in the web to anyone.

    Anyway, first of all I'll present the application which isn't actually a script but a framework to develop PHP applications based in a MVC architecture. There are several things which will make you interested in using it or, at least, check it out (Like myself) ... You can check all the information related here: http://cakephp.org/

    Anyway, as for the installation guide. This guide is ASSURED to work using an out-of-the-box CakePHP 1.3.6 Stable package installation. If you don't do this, most likely you'll get a 404 Error everytime you try to use CakePHP. That's because - For some reason - the virtual and real paths get messed up, so you gotta edit the meaningful .htaccess files.

    It's pretty easy, just extract the ZIP anywhere in your hosting account (I dropped those files in /cakephp folder, just inside the public_html folder) After that you need to modify three .htaccess files. Those are located in the next folders (Using my current folder structure):
    • /cakephp/.htaccess
    • /cakephp/app/.htaccess
    • /cakephp/app/webroot/.htaccess
    In the first file, located in the cakephp folder, you'll see something like this if you open in notepad:

    Code:
       RewriteEngine on
       RewriteRule    ^$ app/webroot/    [L]
       RewriteRule    (.*) app/webroot/$1 [L]
    Just add "RewriteBase /(Location of your CakePHP folder here) between the first and second line. You'll get something like this: (Again, using my folder structure)

    Code:
       RewriteEngine on
       RewriteBase /cakephp
       RewriteRule    ^$ app/webroot/    [L]
       RewriteRule    (.*) app/webroot/$1 [L]
    This will make that whenever someone browses to your cakephp folder, they get redirected to your /cakephp/app/webroot/ folder ~ The same applies with the second .htaccess, which should be something like this

    Code:
        RewriteEngine on
        RewriteBase /cakephp/app
        RewriteRule    ^$    webroot/    [L]
        RewriteRule    (.*) webroot/$1    [L]
    Just add "RewriteBase /(Location of your CakePHP folder here/app) between the first and second line. You'll get something like this: (Again, using my folder structure)

    Code:
        RewriteEngine on
        RewriteBase /cakephp/app
        RewriteRule    ^$    webroot/    [L]
        RewriteRule    (.*) webroot/$1    [L]
    The third, and most essential of the .htaccess files, is the one that controls the views, actions and all those REALLY important things. When you open that .htaccess file in Notepad, you'll see something like this:

    Code:
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
    We do the same we did above, just that now we gotta build the full path to our webroot folder, to get something like this:


    Code:
        RewriteEngine On
        RewriteBase /cakephp/app/webroot/
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
    And ... That's all! You can start building your application with CakePHP on x10Hosting! ~ I want to give special thanks to stpvoice, because he made me notice of this error and helped me solving it. Thanks a lot again!


  2. #2
    mouhou.abdellah15 is offline x10Hosting Member mouhou.abdellah15 is an unknown quantity at this point
    Join Date
    Jan 2011
    Posts
    1

    Re: CakePHP: Simple Installation Guide

    Thanks zeroark it helped.

  3. #3
    vv.bbcc19's Avatar
    vv.bbcc19 is offline Community Advocate vv.bbcc19 is just really nice
    Join Date
    Jun 2010
    Location
    India
    Posts
    1,505

    Re: CakePHP: Simple Installation Guide

    Thank you very much.I tried it too.
    BCV | Community Support Representative
    █ x10Hosting - Giving Away Hosting Since 2004
    Premium Hosting | VPS Services

  4. #4
    callumacrae's Avatar
    callumacrae is offline not alex mac callumacrae is just really nice
    Join Date
    Dec 2007
    Location
    Wellesbourne, England
    Posts
    5,162

    Re: CakePHP: Simple Installation Guide

    Moving to correct forum.

    ~Callum
    I can customise your phpBB board. Send me a PM.
    lynxphp - info, tutorials and scripts
    "A forum post should be like a skirt; long enough to cover the subject but short enough to keep things interesting."

+ Reply to Thread

Similar Threads

  1. CakePHP: 404 Not found error
    By zeroark in forum Free Hosting
    Replies: 3
    Last Post: 01-05-2011, 12:00 PM
  2. Need installation script / help in installation of Joomla 1.5.7
    By swadesh in forum Scripts & 3rd Party Apps
    Replies: 3
    Last Post: 09-21-2008, 11:18 AM
  3. [Offer]Phpbb3 Mods Installation And Script Installation
    By socialnu2 in forum The Marketplace
    Replies: 5
    Last Post: 08-20-2008, 06:28 AM
  4. CSS Guide
    By Jober68 in forum Tutorials
    Replies: 0
    Last Post: 01-14-2008, 09:20 PM
  5. Need Php Platinum installation Guide !
    By Awarapan in forum Scripts & 3rd Party Apps
    Replies: 22
    Last Post: 07-27-2007, 02:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers