Login   Register  
PHP Classes
elePHPant
Icontem

Simple error handling class: Intercept and log PHP execution errors

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

  Author Author  
Picture of Indrek Altpere
Name: Indrek Altpere <contact>
Classes: 3 packages by
Country: Estonia Estonia
Age: 28
All time rank: 8013 in Estonia Estonia
Week rank: 775 Up2 in Estonia Estonia Up


  Detailed description   Download Download .zip .tar.gz  
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).

  Classes of Indrek Altpere  >  Simple error handling class  >  Download Download .zip .tar.gz  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: Simple error handling class
Base name: errormanager
Description: Intercept and log PHP execution errors
Version: -
PHP version: 5.0
License: GNU Lesser General Public License (LGPL)
All time users: 1786 users
All time rank: 2034
Week users: 1 user
Week rank: 1445 Up
 
  Groups   Rate classes User ratings   Dependents   Applications   Files Files  

  Groups  
Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image Logging Log generation and processing View top rated classes


  User ratings  
Not enough user ratings

  Other classes that need this package  
Class Why it is needed Dependency
ORM mapping class(like Hibernate), maps database table rows to objects To be able to log any mysql errors and erros that have occured in BaseObject class itself Recommended

  Applications that use this package  
No pages of applications that use this class were specified.
Add link image If you know an application of this package, send a message to the author to add a link here.
  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

Download Download all files: errormanager.tar.gz errormanager.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.