PHP Error Reporting: How To Do It Right
By Jay Docherty
()
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!
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
Learning PHP 7 High Performance Rating: 0 out of 5 stars0 ratingsMastering PHP Design Patterns Rating: 0 out of 5 stars0 ratingsIntroduction to PHP Web Services: PHP, JavaScript, MySQL, SOAP, RESTful, JSON, XML, WSDL Rating: 0 out of 5 stars0 ratingsJavaScript Unlocked Rating: 5 out of 5 stars5/5Persistence in PHP with Doctrine ORM Rating: 0 out of 5 stars0 ratingsExploring Web Components: Build Reusable UI Web Components with Standard Technologies (English Edition) Rating: 0 out of 5 stars0 ratingsLearn PHP in 24 Hours Rating: 0 out of 5 stars0 ratingsJavaScript: Tips and Tricks to Programming Code with Javascript: JavaScript Computer Programming, #2 Rating: 0 out of 5 stars0 ratingsPHP 7 Programming Blueprints Rating: 0 out of 5 stars0 ratingsReactJS for Jobseekers: The Only Guide You Need to Learn React and Crack Interviews (English Edition) Rating: 0 out of 5 stars0 ratingsLinux, Apache, MySQL, PHP Performance End to End Rating: 5 out of 5 stars5/5Learn PHP Programming in 7Days: Ultimate PHP Crash Course For Beginners Rating: 3 out of 5 stars3/5PHP Team Development Rating: 3 out of 5 stars3/5Art of Clean Code: How to Write Codes for Human Rating: 3 out of 5 stars3/5Getting started with php & mysql: Professional training Rating: 0 out of 5 stars0 ratingsIntroduction to PHP Rating: 3 out of 5 stars3/5Learning PHP 7 Rating: 4 out of 5 stars4/5Learning PHP Data Objects Rating: 5 out of 5 stars5/5PHP Microservices Rating: 3 out of 5 stars3/5AngularJS Deployment Essentials Rating: 0 out of 5 stars0 ratingsJasmine JavaScript Testing - Second Edition Rating: 0 out of 5 stars0 ratingsLaravel 5 Essentials Rating: 0 out of 5 stars0 ratingsJavaScript Security Rating: 4 out of 5 stars4/5JavaScript: Best Practices to Programming Code with JavaScript Rating: 0 out of 5 stars0 ratingsAJAX and PHP: Building Responsive Web Applications Rating: 4 out of 5 stars4/5PHP 5 CMS Framework Development - 2nd Edition Rating: 0 out of 5 stars0 ratingsResponsive Design High Performance Rating: 0 out of 5 stars0 ratingsObject-Oriented JavaScript: Create scalable, reusable high-quality JavaScript applications, and libraries Rating: 3 out of 5 stars3/5
Internet & Web For You
The Logo Brainstorm Book: A Comprehensive Guide for Exploring Design Directions Rating: 4 out of 5 stars4/5Introduction to Internet Scams and Fraud: Credit Card Theft, Work-At-Home Scams and Lottery Scams Rating: 4 out of 5 stars4/5More Porn - Faster!: 50 Tips & Tools for Faster and More Efficient Porn Browsing Rating: 3 out of 5 stars3/5Cybersecurity For Dummies Rating: 4 out of 5 stars4/5The $1,000,000 Web Designer Guide: A Practical Guide for Wealth and Freedom as an Online Freelancer Rating: 5 out of 5 stars5/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5Coding For Dummies Rating: 5 out of 5 stars5/5Hacking : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Ethical Hacking Rating: 5 out of 5 stars5/5The Digital Marketing Handbook: A Step-By-Step Guide to Creating Websites That Sell Rating: 5 out of 5 stars5/5Beginner's Guide To Starting An Etsy Print-On-Demand Shop Rating: 0 out of 5 stars0 ratingsTor and the Dark Art of Anonymity Rating: 5 out of 5 stars5/5The Cyber Attack Survival Manual: Tools for Surviving Everything from Identity Theft to the Digital Apocalypse Rating: 0 out of 5 stars0 ratingsGet Rich or Lie Trying: Ambition and Deceit in the New Influencer Economy Rating: 0 out of 5 stars0 ratingsSEO For Dummies Rating: 4 out of 5 stars4/5Wireless Hacking 101 Rating: 4 out of 5 stars4/5200+ Ways to Protect Your Privacy: Simple Ways to Prevent Hacks and Protect Your Privacy--On and Offline Rating: 0 out of 5 stars0 ratingsHow To Make Money Blogging: How I Replaced My Day-Job With My Blog and How You Can Start A Blog Today Rating: 4 out of 5 stars4/5The Internet Is Not What You Think It Is: A History, a Philosophy, a Warning Rating: 4 out of 5 stars4/5The Beginner's Affiliate Marketing Blueprint Rating: 4 out of 5 stars4/5Everybody Lies: Big Data, New Data, and What the Internet Can Tell Us About Who We Really Are Rating: 4 out of 5 stars4/5Podcasting For Dummies Rating: 4 out of 5 stars4/5Social Engineering: The Science of Human Hacking Rating: 3 out of 5 stars3/5Six Figure Blogging Blueprint Rating: 5 out of 5 stars5/5How To Start A Podcast Rating: 4 out of 5 stars4/5
Reviews for PHP Error Reporting
0 ratings0 reviews
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