Database switching in CakePHP

Published: on 9/9/08 | Comments (0)

Thought I would share a quick tip today for managing database connections and debug information betwen your local development machine and production server.

Personally I tend to have a version running on my local development machine and on my web server and keep them in synch using the excellent Aptana Studio IDE and the following mean that I can do this without worrying about overwriting my database settings whenever I synchronise.

For starters replace the DATABASE_CONFIG class in...


cakePHP Thumbnail Helper with GIF, PNG and JPG support

Published: on 8/9/08 | Comments (3)

Hi all, a couple of weeks I got a request to add PNG and GIF support to my cakePHP thumbnail helper, so thought I'd post a quick updated version which includes this functionality.

Not a difficult one, I admit as the excellent phpThumb class library already includes this functionality, so just a matter of defining a default in the variable $extension, checking for an extension key in params, then setting it dynamically. In fact the only reason I didn't do this was because I didn't need it...


Things to see and do in Gran Canaria

Published: on 16/8/08 | Comments (0)

Ok, it's been a few weeks since my last post (mainly due to moving home and waiting for Telefonica to connect up my ADSL connection), but I'm back now and thought I would kick off with a new series of posts about some of The places to go and things to do here in my new home of Gran Canaria

Las Vegas Legends - Casino Royale

Casino Meloneras

Number one of the must do list if you ever come to visit Gran Canaria is to visit the Las Vegas Legends, Black and Red Casino show, at the Casino in...


CakePHP Thumbnail Helper

Published: on 8/7/08 | Comments (7)

Today I've been working on generating thumbnails using the excellent phpThumb library, and integrating it into a CakePHP application I am writing.

In case you've not come across it before, phpThumb uses the GD library to create thumbnails from images (JPEG, PNG, GIF, BMP, etc) on the fly. The output size is configurable (can be larger or smaller than the source), and the source may be the entire image or only a portion of the original image. True color and resampling is used if GD v2.0+ is...


CakePHP Containable Behavior

Published: on 3/7/08 | Comments (8)

The last week or so, I have been taking a good look at the latest release of CakePHP.

CakePHP.1.2.0.7296 RC2 is a great release, so a big pat on the back to the entire development team, and keep up the good work.

One of my favourite features of the this release is the new Containable Behaviour which was introduced back in change set 6918 and is a mixture of two behavoirs, the original Containable behavior by Felix Geisendörfer and the Bindable behavior by Mariano Iglesias.

Basically the...



About Studio Canaria

Studio Canaria is the web site of freelance web developer, Peter Butler. Articles on this site relate to designing, developing and marketing modern web applications.

Recent Comments

Dave on CakePHP Auth Component - Users, Groups & Permissions Revisited
I dont understand how you define permissions for each contoller to User. Do I have to manually...
SI on CakePHP Auth Component - Users, Groups & Permissions Revisited
Hi Peter,

I am having little issue logging into the application. I have 2 user groups both having...
Alig on CakePHP Auth Component - Users, Groups & Permissions Revisited
Thank you very much for this tutorial. After fighting for hours to get the cakephp ACL working,...
Benny on CakePHP Auth Component - Users, Groups & Permissions Revisited
thank you for your solution it's perfect , you are genius , thank you this is the best ( beside...
Gordon on CakePHP Auth Component - Users, Groups & Permissions Revisited
I'm having a similar problem to luis. I followed everything as instructed here up to the point...