tip

CakePHP deployment errors

August 12, 2008

If you have set cakephp up so that DocumentRoot of apache is pointing to app/webroot/ you might have encountered a couple of errors like these – not the first time you set it up, but consequent attempts to remove and replace the files.

CakePHP redirect to admin methods

July 30, 2008
Thumbnail image for CakePHP redirect to admin methods

If you have admin routing set: Configure::write(’Routing.admin’, ‘admin’); Redirecting between admin_* and non admin functions inside the controller, or linking to admin_* functions from non admin views can throw an error unless you pass an admin variable in the URL.

Use iconv to help migrate databases

July 21, 2008

Iconv is a useful tool to convert the encoding of given files from one encoding to another – which comes in very handy if you want to migrate that old MySQL 4 database to a hot new MySQL 5. I recently had to migrate a database from MySQL 4 to 5 and its not as [...]

Javascript Dom Quirk In IE using getElementById

April 24, 2008

This is a fun one I found today – using getElementById() in IE7 to find a dom element on the page, if you are getting some interesting errors then one possibility is that you have two elements with the same id – or the same name attribute it seems.

Resize images in Ubuntu

April 9, 2008

Looking around for an easy way to resize my images ready for uploading to facebook. Sure, you can use gimp batch processes, but that looks like an awful lot of work. You could install Davids batch processor for Gimp. OR, you could do it the truly easy way with a single command:

Carriage Returns in PHP Plain Text Emails

April 3, 2008

Another quick tip for the archives. Carriage returns on lines in your view finishing with a php statement. Try sending these views as an email and somehow the resulting email does not look entirely correct. The carriage returns have not been passed through. This is a quick, hackish, tip so I really didn’t get to [...]