• Debugging test cases

    By Andy, filed under CakePHP

    Hurray it's the middle of summer and obviously like most people I am quite focused on testing code. What? You mean that isn't a typical summer activity :D?

    I've written a few tests with the CakePHP test suite now and can safely say that after you have written your first one, it's very easy to write another. One thing that is a great help but not so clear how to do is how...

    read more1 comment

  • Domain change to ad7six.com

    By Andy, filed under NoswaD

    A real short one today only to point out that the contents of noswad.me.uk have moved to ad7six.com. You are unlikely to notice the difference as (surprise, surprise) you'll get redirected automatically.

    read more6 comments

  • Following Cake's code standards

    By Andy, filed under CakePHP, CoreStuff

    If a team of developers follow a set of agreed code standards, it makes life a whole lot easier to compare (i.e. a diff) of two versions of the same code and see what has changed. If you try to compare two version of the exact same code formatted differently, the result will be a lot of highlighted differences when in terms of functionality they are the same. This is quite ...

    read more2 comments

  • Apache named parameter problem

    By Andy, filed under CakePHP, Apache

    I just ran across a rather curious problem, which proved to be pretty fatal. I thought I'd jot a note down so I don't forget and so it can be found by others - it also forms reason #6538 why not to develop with a windows machine :).

    The Problem

    With a standard (1.2) cake install, the colon (:) will be used as the default separator for named arguments; if you decide...

    read more3 comments

  • Making the most of the router

    By Andy, filed under CakePHP, CoreStuff

    The router is the part of Cake which takes your url and splits it up so the dispatcher knows which controller and action to run. In 1.1 that's about all it does, but in 1.2 the router also works the other way around too - you can feed it an array of controller, action and paramters and it will tell you which url that corresponds to. All of cakes url using/generating methods ...

    read more8 comments

  • Don't mail me my site errors

    By Andy, filed under CakePHP, Tools, Error, Logs, Database

    I wrote recently about how to have your site(s) email you whenever a problem occurs. Trouble is "problem" turns out to be a rather broad scope. If you have a missing file or fundamental problem of some kind, you would want to know so you can fix it; if there was a dead link on your site, you would also want to fix it; if someone just mistypes the url (or follows a link...

    read more0 comments

  • Xhtml Code Validity

    By Andy, filed under CakePHP, beforeRender, NoswaD, XHTML

    There was a time when this site was 100% xhtml valid. It didn't last long, as as soon as I forgot to correctly close a tag anywhere on the page, or added some beta-ish new functionality, or updated my cake version inevitably something became invalid. I used the Xhtml Validation helper for a while, but the messages it generated got in the way rather than helping. I still use...

    read more0 comments

  • Email me my site errors

    By Andy, filed under CakePHP, Tools, Error, Logs

    Have you ever wondered what the reason for that 404 error is when you set debug to 0, or when you move your site onto your live server? How many visitors/clients are confronted by a 404 when they should be looking at the fruits of your work? Cake allows you to modify what happens in the case of an error, and the purpose of this post is to show how to make your site mail you ...

    read more2 comments

 1 | 2 | 3