Error reporting, PHP and BugzScout
Although testing will pick up major issues pre-release, it is still important to know when errors are triggered in production. This might catch previously unknown bugs, error cases from certain user data or unexpected events within your hosting environment e.g. database corruption.
The web UI for our server monitoring application, Server Density, is built using PHP which has quite strong error handling functionality. You certainly do not want to be displaying errors to users but logging to a file is not very flexible and means you have to be checking it manually, or set up a system to do that for you.
We have error handling logic built into the application for fatal problems like the database being unavailable or being able to access temporary files. These all display a message to the user but more importantly, we have error reporting so we know immediately when issues occur. This is also hooked into the PHP error reporting so that we know about everything that could go wrong.
The very basic way to do error reporting is to use e-mail direct to the developers but after a few e-mails, these will usually start to get filtered into mail folders and often forgotten. Instead, we use BugzScout.
All our development and customer support is tracked using FogBugz. I believe this to be the best product for bug/feature tracking and it has a great error reporting feature that means we can log reports as new FogBugz cases and it will automatically keep a tally of the number of occurrences so we don’t get spammed by huge numbers of generated errors (e.g. when there is a DB issue).
We build the content of the report to include key information and the unique title based on the version means that we can quickly find out where the problem lies. It also means that every error can be tracked and assigned to someone to work on fixing and we can quickly spot important issues as they happen.
This level of information is important for maintaing a high quality service, but it is even more useful if your customers install the product on their own servers as it means you can collect detailed information at the time of the error so you can not only fix it quicker, but know exactly what the customer is talking about when they contact you.

