How to Use CakePHP in CSE

Introduction

This page describes how to build a CakePHP site in your CSE home directory.

Ingredients

You'll need these things to complete this project:

  • An account on the CSE development web server, cheshire.
  • A MySQL account.

Procedure

  1. Login to the CSE development web server:
    
    % ssh cheshire
    
    
  2. You must perform this step on cheshire. Copy (recursively) the current system CakePHP installation into your ~/public_html directory:
    
    [cheshire] ~% cp -R /usr/local/www/cakephp ~/public_html/mycakephp
    
    
  3. Set the RewriteBase value for this application. Edit each of these three .htaccess files:
    
    /.htaccess
    /app/.htaccess
    /app/webroot/.htaccess
    
    

    ... to include a RewriteBase definition:

    
    
       RewriteEngine on
       RewriteBase /~userid/mycakephp
       RewriteRule    ^$ app/webroot/    [L]
       RewriteRule    (.*) app/webroot/$1 [L]
    
    
    
  4. Test. You should be able to see your (currently unconfigured) CakePHP site on the web now:
    
    http://www-student.cse.buffalo.edu/~userid/mycakephp
    
    
  5. Now you should be ready to follow the tutorials referenced below (if you're just learning CakePHP) or develop your own content (if you're already familiar with it).

References

  1. http://book.cakephp.org/2.0/en/tutorials-and-examples.html