So far in this book, we've shown you the techniques to build the popular components of a web database application. This chapter shows you how to find bugs in those components and prepare your application for deployment by adding the finishing touches that will make it a professional web database application.
The first two sections introduce PHP errors, common causes of programming error, and how to find them. We show you examples of error types, and explain how error reporting can be configured for debugging while you're coding and adjusted later for deployment. We also discuss the common sources of error in PHP, their symptoms, and how to rectify them.
The second half of this chapter discusses application deployment. We show you how to add your own error handler that reports errors to the user in a framework that's managed by the application, sends errors to a log or the system administrator, and handles custom errors you can trigger from your code.
Chapter 16 through Chapter 20 present a complete, annotated online winestore web database application. The application is built using the techniques and components discussed in earlier chapters, and debugged using the approaches discussed in this chapter. It includes a full-featured custom error handler.