PHP Classes

Simple error handling class: Intercept and log PHP execution errors

Recommend this page to a friend!
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2016-06-18 (3 years ago) RSS 2.0 feedStarStarStar 56%Total: 1,943 All time: 2,005 This week: 313Up
Version License PHP version Categories
errormanager 1.1GNU Lesser Genera...5.0PHP 5, Logging
Description Author

This class can be use to intercept and log PHP execution errors.

It can enable PHP execution error logging setting the file that logs error messages.

The class provides an error handler function that outputs a stack back-trace with the functions, arguments, file and lines of where an error occurs, as well the values of super-global variables $_GET, $_POST and $_FILES, and also the IP address of the current user accessing the site.

The class may also enable of disable the output of error messages to Web pages and change the error reporting level.

When used together with my Mysql class (or any other mysql class that calls trigger_error when there was mysql_error) it can effectively log all mysql errors with the complete stacktrace what you can inspect from the logfile later on.
Plus you can identify sql injections when someone's queries keep failing with error messages.

You can also specify error codes that exit the script execution plus your own callback function that will be called before exiting (good to display some nice error page to users before exiting script execution).

Name: Indrek Altpere <contact>
Classes: 3 packages by
Country: Estonia Estonia
Age: 33
All time rank: 7922 in Estonia Estonia
Week rank: 807 Down4 in Estonia Estonia Down


  Files folder image Files  
File Role Description
Accessible without login Plain text file ErrorManager.php Class Main class file
Accessible without login Plain text file test.php Example testing example

 Version Control Reuses Unique User Downloads Download Rankings  
This week:0
All time:2,005
This week:313Up
 User Ratings  
 All time