CakePHP is a wonderful framework, but it really drops the ball when it comes to practical error management. In production environments (DEBUG = 0), only 404 or 500 errors are displayed to the user, and no errors are written to the log files.
To solve these two problems we override php’s error handler to enable production error logging, and cake’s error handler to allow forward facing error pages.
I’m told I’m not a very funny person. Nor is my writing of particular quality. However, after camping this domain name for the last eight years I’ve finally decided to do something useful (perhaps debatable) with the space and start my own blog.
tab2space() converts tabs to the appropriate amount of spaces to preserving formatting.
str_rand() provides a quick wrapper for customised random string output.