Getting CakePHP database session data for an external script

I have a requirement for a current project to be able access the CakePHP session data for a script which is running outside of the framework. In normal circumstances this would be as simple as: session_name(‘CAKEPHP’); session_start() print_r($_SESSION); However in my case the session data is stored in the database. In this situation you need […]

Apache, .htaccess, mod_rewrite, git and CRLF

Today I came across a frustrating and ultimately difficult to debug situation brought about by a cocktail of circumstances. Working on a site the rewrite rules suddenly stopped working when I made a small change to the .htaccess file. Nothing unusual here, back up the change and carry on. Except backing up the change made […]

CakePHP Self Referencing User Model

I recently needed to create a data model which included a friend-type system. Not a social network type thing but simply the ability to tag other users of a system. Sounds simple enough! The application is written in CakePHP which has some fairly good ORM facilities but what I wanted wasn’t really simple to implement. […]