PHP Error Reporting: How To Do It Right by Jay Docherty - Read Online
PHP Error Reporting
0% of PHP Error Reporting completed

About

Summary

PHP's error reporting is not great out of the box, but luckily it provides us with a way to set up our own custom error handling. This book gets stuck into how to do error handling well, with practical examples and downloadable code. We also take a broader look at strategies and best practices.

What you will learn
- all about PHP’s built-in error reporting systems
- An approach to error reporting strategy (what we present to the user vs what goes to the developer)
- What information to include in PHP error reprts (and how to only include the useful stuff)
- sample code for informative admin emails
- Common pitfalls for admin emails, for example: how to throttle the admin email rate so you don’t fill up your email inbox
- Third-party tools to help with reporting
- And which pieces of code are most likely to fail unexpectedly (so we can make our reporting focus on at-risk code).

This book is for you if:
You've ever got phone calls or emails because a site you built is having a problem
You want to improve the error handling on your existing sites
You want your next site to have better error reporting
You want to improve your development and debugging workflow
You want to know about errors before your clients and customers do

Contents
Chapter 1: Definitions
Chapter 2: Built-in reporting mechanisms
Chapter 3: Strategies
Chapter 4: Custom Error Reporting
Chapter 5: Custom Error Reporting revisited: much better email reports
Chapter 6: Offline Error Reporting
Chapter 7: Trapping and Treating Errors
Appendix A: (Mostly) Completed GLPErrorReport Class
Resources

Also Included:
- Free downloads:
- A lightweight Error Reporting System that sends email reports.
- And an advanced PHP Class that is designed to send email reports in regular digests, and with duplicates filtered out!

Published: Jay Docherty on
ISBN: 9781301993505
List price: $2.99
Availability for PHP Error Reporting: How To Do It Right
With a 30 day free trial you can read online for free
  1. This book can be read on up to 6 mobile devices.

Reviews

Book Preview

PHP Error Reporting - Jay Docherty

You've reached the end of this preview. Sign up to read more!
Page 1 of 1

Lastly

Introduction

back to top

They say a police is only as good as his informants.

- Bunk Moreland, The Wire.

Bunk's character is a homicide detective, not a PHP developer, but you might just as accurately say that a developer is only as good as his tools. This book focusses on Error Reporting tools, an aspect of development that often gets overlooked. But done right, Error Reporting can be a very important part of your code: good error reporting can help you fix bugs before your clients know about them, and can help reduce the number of bugs that make it to your finished sites. Why would you not want to improve the error handling on your websites?

Who this book is for

I'm going to go ahead and assume a few things about you:

- You've written some PHP before.

- You've probably already made a project (perhaps several) go live.

- Your projects, like everybody else's, have had their share of bugs or errors that only became apparent after the site went live.

- You'd like to improve the error handling of your PHP projects.

I'm going to help you do this. It's not hard, and the great thing is that you can make this stuff into boilerplate code that you can use again and again with little adaptation required.

Pre-requisites

As mentioned, this book is for people who have already written some PHP. If you haven't written any PHP yet, go and work your way through my ebook The 24 Hour PHP Tutorial at http://golearnphp.com/24kindle/. Other than some basic knowledge of PHP, you will also need a text editor, of which there are many fine choices.

Topics

The book covers not just what PHP does automatically in the way of error reporting, but also how to do error reporting well: in other words I want to cover strategies, common pitfalls, and anything else valuable to PHP programmers. We'll be touching on:

- A guide to PHP’s built-in error reporting systems

An approach to error reporting strategy (what we present to the user vs what goes to the developer)

- What information to include (and how to only include the useful stuff)

- sample code for informative admin emails

- Common pitfalls for admin emails: for example how to throttle the admin email rate so you don’t fill up your email inbox

Third-party tools to help with reporting

- And