Tag Archives: cake

MVC Web Frameworks: PHP vs. JVM

I am reviewing web frameworks for product development at Resource Interactive. Here are my thoughts. Please keep this in mind when reading the following: ALL of the statements below are OPINIONS. Please feel free to disagree. Problem We’ve been using CakePHP for 6 months, but recently it has been getting in our way on a [...]

Posted in essays | Also tagged , , , , , , , , , | Leave a comment

CakePHP Migrations on Mac OS X 10.6 Snow Leopard

Enable PHP, install PEAR, update system PATH, and update PHP include_path Open Terminal and install MDB2: cd /usr/local sudo pear install MDB2-2.5.0b2 sudo pear install MDB2_Driver_mysql-1.5.0b2 And then… Install CakePHP DB Migrations If MDB2 throws a “Native Code: 2002″ error when you “cake migrate” or “cake populate”, PHP is probably looking for mysql.sock in a [...]

Posted in essays | Also tagged , | Leave a comment

CakePHP Command-Line Console in Mac OS X Snow Leopard

The instructions below should work for all versions of Mac OS X. YMMV. You may substitute .profile for .bash_profile. Older versions of Mac OS X may need to substitute “nano” for “pico”. nano ~/.bash_profile Add or edit the PATH line to get “cake bake …” working within your app/ directory: PATH=”$PATH:../cake/console/” If you want “cake [...]

Posted in essays | Also tagged , , | Leave a comment

CakePHP + mod_rewrite on Snow Leopard

Creating a CakePHP 1.2.5 app on a Snow Leopard machine, which comes with PHP 5.3, I encountered the following error when I tried to run the app: “The requested URL /Users/username/Sites/cakeapp/app/webroot/ was not found on this server.” The solution is to use the RewriteBase directive in ~/Sites/cakeapp/.htaccess: <IfModule mod_rewrite.c> RewriteEngine On # NOTE THE TILDE: [...]

Posted in essays | Also tagged , , , | Leave a comment

Akelos vs. Cake: Let me eat Cake.

I’m still drinking the Ruby Kool Aid, but when I have to PHP in my own well: class User extends AppModel { var $name = ‘User’; var $primaryKey = ‘user_id’; var $useDbConfig = ‘alternate’; } — Cake: easy as pie. class User extends ActiveRecord { function init ($attributes = array()) { parent::init($attributes); $this->setPrimaryKey(‘user_id’); } function [...]

Posted in essays | Also tagged , | Leave a comment