Category Archives: CakePHP

CakePHP Twitter and Bitly Components

I promised more programming related posts, and here’s one for you. As part of developing TweeterDiet.com, I needed to interface with Twitter and Bit.ly to post tweets and the links back to the public profiles on TweeterDiet. I searched around for a while, and didn’t immediately run across any good components for what I needed, [...]

TweeterDiet.com and CakePHP

First things first. As of 11:45 PM last night, my latest project launched. Go take a look at TweeterDiet.com Go ahead. I’ll still be here when you get back. Yes, I know it’s very minimal right now. I’ll be remedying that over the next week or so, by adding in some sample screen-shots and more [...]

CakePHP mod_rewrite optimization

CakePHP is great, but the default installation has a performance issue that is very easy to resolve, and should be fixed in any production installation of a CakePHP application. The solution is very simple. In the default install, there is a file in the webroot called .htaccess. It contains mod_rewrite rules, and you have to [...]

CakePHP Shells, and Cron Jobs

As part of the same project that resulted in my last posting, I needed to write several processes that would be managed by cron. In the past, at the Yahoo contract, we had come up with a way to do this involving a customized version of the basic CakePHP index.php file. However, his required us [...]

Automatic DB Field Encryption in CakePHP

I’ve written the following behavior for a project I recently completed in Cake, and I thought it would be worth sharing: class CryptableBehavior extends ModelBehavior { var $settings = array();   function setup(&$model, $settings) { if (!isset($this->settings[$model->alias])) { $this->settings[$model->alias] = array( ‘fields’ => array() ); }   $this->settings[$model->alias] = array_merge($this->settings[$model->alias], $settings); }   function beforeFind(&$model, [...]