Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

PHP Error Reporting: How To Do It Right
PHP Error Reporting: How To Do It Right
PHP Error Reporting: How To Do It Right
Ebook63 pages54 minutes

PHP Error Reporting: How To Do It Right

Rating: 0 out of 5 stars

()

Read preview

About this ebook

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!

LanguageEnglish
PublisherJay Docherty
Release dateAug 20, 2013
ISBN9781301993505
PHP Error Reporting: How To Do It Right
Author

Jay Docherty

I run a small web development company. I’ve been writing PHP since 2000, and HTML since 1996. I have a passion for the Mac OS and technical writing and in addition to golearnphp.com run the Mac-focussed blog leftcolumn.net.

Related to PHP Error Reporting

Related ebooks

Internet & Web For You

View More

Related articles

Reviews for PHP Error Reporting

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    PHP Error Reporting - Jay Docherty

    PHP Error Reporting

    Jay Docherty

    Smashwords EDITION

    *****

    PUBLISHED BY:

    Jay Docherty on smashwords.com

    PHP Error Reporting

    Copyright © 2013 by Jay Docherty

    Thank you for buying this ebook. It remains the copyrighted property of the author and may not be reproduced, scanned, or distributed for any commercial or non-commercial use without permission from the author. Quotes used in reviews are the exception. No alteration of content is allowed. If you enjoyed this book, then encourage your friends to buy their own copy.

    Your support and respect for the property of this author is appreciated.

    This ebook is not official or affiliated with Zend in any way. The commands and tools described here can damage your computer and/or data if not used with care. Please read carefully and have fun.

    Errata, updates, comments, and suggestions at http://golearnphp.com.

    Table of Contents

    Introduction

    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

    About the Author

    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

    Enjoying the preview?
    Page 1 of 1