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 ratingsIntroduction to PHP Web Services: PHP, JavaScript, MySQL, SOAP, RESTful, JSON, XML, WSDL Rating: 0 out of 5 stars0 ratingsLearning PHP 7 Rating: 4 out of 5 stars4/5PHP 7 Programming Blueprints Rating: 0 out of 5 stars0 ratingsMastering PHP Design Patterns Rating: 0 out of 5 stars0 ratingsPersistence in PHP with Doctrine ORM Rating: 0 out of 5 stars0 ratingsAdvanced Web Development with React: SSR and PWA with Next.js using React with advanced concepts Rating: 0 out of 5 stars0 ratingsLearn PHP in 24 Hours Rating: 0 out of 5 stars0 ratingsApache Solr PHP Integration Rating: 0 out of 5 stars0 ratingsJava: Tips and Tricks to Programming Code with Java Rating: 0 out of 5 stars0 ratingsP.H.P Simple C.R.U.D Design Rating: 4 out of 5 stars4/5Node.js: Novice to Ninja Rating: 0 out of 5 stars0 ratingsIntroduction to PHP Rating: 3 out of 5 stars3/5PHP Team Development Rating: 3 out of 5 stars3/5HTML for the Business Developer: with JavaServer Pages, PHP, ASP.NET, CGI, and JavaScript Rating: 3 out of 5 stars3/5Linux, Apache, MySQL, PHP Performance End to End Rating: 5 out of 5 stars5/5Learning PHP Data Objects Rating: 5 out of 5 stars5/5PHP Microservices Rating: 3 out of 5 stars3/5PHP Reactive Programming Rating: 0 out of 5 stars0 ratingsStep-by-Step Angular Routing: Learn To Create client-side and Single Page Apps with Routing and Navigation Rating: 0 out of 5 stars0 ratingsJasmine JavaScript Testing - Second Edition Rating: 0 out of 5 stars0 ratingsAngularJS Deployment Essentials Rating: 0 out of 5 stars0 ratingsMicrosoft .NET Framework 4.5 Quickstart Cookbook Rating: 0 out of 5 stars0 ratingsASP.NET 3.5 Application Architecture and Design Rating: 0 out of 5 stars0 ratingsMastering Symfony Rating: 0 out of 5 stars0 ratingsWeb Application Development with MEAN Rating: 0 out of 5 stars0 ratingsNode Cookbook: Second Edition Rating: 3 out of 5 stars3/5Reactive State for Angular with NgRx Rating: 0 out of 5 stars0 ratings
Internet & Web For You
Coding For Dummies Rating: 5 out of 5 stars5/5No Place to Hide: Edward Snowden, the NSA, and the U.S. Surveillance State Rating: 4 out of 5 stars4/5Get Rich or Lie Trying: Ambition and Deceit in the New Influencer Economy Rating: 0 out of 5 stars0 ratingsHow to Disappear and Live Off the Grid: A CIA Insider's Guide Rating: 0 out of 5 stars0 ratingsHacking : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Ethical Hacking Rating: 5 out of 5 stars5/5How 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 Logo Brainstorm Book: A Comprehensive Guide for Exploring Design Directions Rating: 4 out of 5 stars4/5Social Engineering: The Science of Human Hacking Rating: 3 out of 5 stars3/5Podcasting For Dummies Rating: 4 out of 5 stars4/5How to Be Invisible: Protect Your Home, Your Children, Your Assets, and Your Life Rating: 4 out of 5 stars4/5Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5The Hacker Crackdown: Law and Disorder on the Electronic Frontier Rating: 4 out of 5 stars4/5Six Figure Blogging Blueprint Rating: 5 out of 5 stars5/5The Designer's Web Handbook: What You Need to Know to Create for the Web Rating: 0 out of 5 stars0 ratingsStop Asking Questions: How to Lead High-Impact Interviews and Learn Anything from Anyone Rating: 5 out of 5 stars5/5200+ Ways to Protect Your Privacy: Simple Ways to Prevent Hacks and Protect Your Privacy--On and Offline Rating: 0 out of 5 stars0 ratingsThe Cyber Attack Survival Manual: Tools for Surviving Everything from Identity Theft to the Digital Apocalypse Rating: 0 out of 5 stars0 ratingsThe Beginner's Affiliate Marketing Blueprint 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/5The Gothic Novel Collection Rating: 5 out of 5 stars5/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5Python QuickStart Guide: The Simplified Beginner's Guide to Python Programming Using Hands-On Projects and Real-World Applications Rating: 0 out of 5 stars0 ratingsThe Digital Marketing Handbook: A Step-By-Step Guide to Creating Websites That Sell Rating: 5 out of 5 stars5/5Mike Meyers' CompTIA Security+ Certification Guide, Third Edition (Exam SY0-601) Rating: 5 out of 5 stars5/5The Mega Box: The Ultimate Guide to the Best Free Resources on the Internet Rating: 4 out of 5 stars4/5How To Start A Profitable Authority Blog In Under One Hour Rating: 5 out of 5 stars5/5The Internet Is Not What You Think It Is: A History, a Philosophy, a Warning Rating: 4 out of 5 stars4/5Cybersecurity For Dummies 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