vernal pool

Mittineague

WordPress Error Reporting Plugin

There are no plants in blossom on November the 26th.
The earliest date currently listed is Mar 15, and the latest date is Nov 11

It is the hope that the Error Reporting plugin will prove to be a valuable tool for the WordPress developer. Highly customizable settings allow for the ability to locate various types of both native WordPress Core errors, and plugin and theme errors. Errors can be handled by logging to files and/or by email notification. The Error Reporting plugin can help identify problems during plugin development, and can help in both locating and keeping aware of errors in a live blog.
The Ping Errors feature can catch up to 100 ping errors. These are displayed in both a dashboard widget and on the plugin's Settings page. Great for tracking repeated ping failures so you can clean up your ping list.

The current version is 1.0.0 RC If you find any bugs or have any suggestions for improvement, Please let me know.

Ping Errors

The Ping Errors feature works independently from Log Errors and Email Errors. That is, it can be enabled even if one or both of the others are not enabled.
If you do not want to see the widget on your dashboard, please go to dashboard's "Screen Options" and deselect "Ping Errors"
* Because a ping fails once, or even a few times, does not necessarily mean that it should be removed from your ping list. However, if one is repeatedly failing over a long period of time, it justifies investigation and possible removal.
The Ping Error feature is also available as a stand-alone plugin Ping Watcher
The two are not compatible and both can not be activated at the same time.

Log Error Reporting

Depending on where an error occurs, it will be logged to a er-log folder that's either under the blog's installation folder, or under the wp-admin folder. New files are created for each day with names having the format 'ER-dd-Mmm-yyyy.log'
eg. ER-05-Mar-2009.log

Auto Delete Old Log Files

The auto delete uses core WordPress CRON and as such is not real CRON but occurs when your blog is visited. Once per day the auto delete can remove files older than one week - 7 days, or one month - 31 days. So depending on your blog's activity, there may be some slight imprecision, but in general using the auto delete will prevent the error log folders from becoming bloated.

Email Error Reporting

Email Error Reporting does not have a 'no repeat errors' setting. This means that the blog administrator's email address will get an email for every reported error, every time.
For example, while testing this plugin using the default settings, 10 failed pings generated 190+ emails. It is strongly suggested that you 'fine tune' your options using Log Error Reporting first (with the Repeat Error option set to yes to get an accurate indication of how many emails would have been sent) and get the errors down to a manageable amount before experimenting with the Email Error Reporting settings.
Be very careful setting these options. You could end up flooding the inbox with hundreds, and MORE LIKELY THOUSANDS, of emails in a relatively short amount of time.
Note that the default Email Error Reporting settings are not enabled on install.

Error Types Options

The Error Reporting plugin can report E-WARNING, E_NOTICE and E_STRICT errors.
Any E_RECOVERABLE_ERROR, and any 'trigger' errors, E_USER_ERROR, E_USER_WARNING, and E_USER_NOTICE, will be reported if the option settings report 'other error types' (see the 'Option Settings Logic' section).
If you want to ensure that all error types are reported, check 'Yes, All Error Types'.
If you are interested in only certain error types 'Include' them.
Conversely, if you specifically do not want an error type, 'Exclude' it.

AND / OR Option

The AND / OR option setting will only matter if neither 'Types' nor 'Folders' are set to 'All'.
But, if both are either 'Exclude' - 'Include', it will make a big difference (see the 'Option Settings Logic' section).

Folder Options

Errors in Files that are under the blog's install folder, and are not in the wp-admin, wp-content, or wp-includes folders, will be reported if the option settings report 'other folders' (see the 'Option Settings Logic' section).
Note that the plugins folder is inside the wp-content folder. It is presented as a separate option to allow for more precise control.
If the wp-content folder is included / excluded, so too will be the plugin folder with it. Likewise for any folders under the other folders.

Context and Repeat Errors Options

Including the Context of the error may provide some helpful information, but as it adds significantly to the size of the log file, it is by default not included.
Likewise, there may be times when it would be helpful to see that a line of a file is causing the same error 'X' amount of times, but because including Repeat errors would add significantly to the size of the log file, it too is by default not included.
Note that there is no repeat error option for Email Error Reporting.
Because each error will be sent as an individual email, the Context is not as crucial a setting here as it is for the Log options. So once you're sure you have the number of emails being sent under control, you may want to include it if that information will help you.

Timezone Option

This value is initially set to the server's timezone and controls what time is used.
*Note* This option requires PHP version 5+

Self Cleanup

Deactivating this plugin will remove the "Number of Ping Errors to Save" setting.
Uninstalling this plugin using the WordPress plugin list page's "delete" will remove the plugin's options from the wp-options table, including any saved ping errors, and all Log files and folders will be deleted.

Option Settings Logic

Tables that provide a visual explanation by example.

Log Files

Provides links to the log files for viewing / saving, and a way to delete them.
Note that they must be temporarily toggled to insecure to access them. Because a native WordPress Core error will reset the permissions if the plugin is set to "E_NOTICE" and "wp-include", the 'shutdown' action hook is also removed.
Please remember to toggle permissions back to secure to prevent direct HTTP access to the files and re-enable the output buffer flush as not doing so may result in a security risk and possible PHP memory problems.

Installation

  1. Upload 'errorreporting.php' to the '/wp-content/plugins/' directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Click the 'Options'/'Settings' admin menu link, and select 'ErrorReporting'
  4. Configure the options

Email Options Screenshot

screenshot of plugin GUI

Option Settings Logic Screenshot

screenshot of plugin GUI

Log Files Screenshot

screenshot of plugin GUI

Ping Errors GUI Screenshot

screenshot of plugin GUI

Ping Errors Dashboard Widget Screenshot

screenshot of plugin GUI

Version History

1.0.0 RC 09-Feb-2010

  • replaced deprecated user_role
  • auto delete old log files feature
  • minor tweaks

Beta 0.10.1 13-Aug-2009

  • skip SimplePie errors for now
  • capability check
  • changed Version History to Changelog in readme

Beta 0.10.0 01-Apr-2009

  • added ping error - dashboard widget code
  • added self-cleanup hooks
  • removed deprecated option descriptions
  • nonce tweaks
  • removed print_r $context
  • added return false
  • changed admin CSS hook
  • removed fail returns from handler

Beta 0.9.6 15-Mar-2009

  • fixed uninitialized variables
  • fixed 'all types' 'all folders' bug
  • remove/add 'shutdown' action
  • added label tags
  • friendlier CSS selectors
  • added 'register_activation_hook'

Beta 0.9.5 27-Jan-2009

  • changed mktime() to time()
  • "info" link fix
  • replaced "short tags"
  • changed 'wp'logs to 'er'logs
  • added javascript select/deselect all

Beta 0.9.4 10-Apr-2007

  • made date_default_timezone_get/set OK for PHP < ver. 5

Beta 0.9.3 09-Apr-2007

  • removed error_log from Log block fopen-fwrite fails
  • added natsort to log file display
  • rearranged page sections
  • minor mark-up and info edits

Beta 0.9.2 30-Mar-2007

  • Security improvements
    • make wp-log folders / files not world readable
    • added nonces to form actions
  • minor GUI changes
  • added error_log to Log block fopen-fwrite fails

Beta 0.9.1 29-Mar-2007

  • fixed buggy conditional generating code block
  • added info re E_RECOVERABLE_ERROR
  • added chmod to fix annoying sporadic permission resets

Beta 0.9.0 28-Mar-2007


Download the plugin Error Reporting 1.0.0 RC
For support, please visit the Mittineague Forums (registration required to post)
For comments / suggestions, please visit the Mittineague Blog

About - Blog - Sitemap - Contact - Forums - Home 

PHP icon. PEAR icon. MySQL icon. phpBB icon. Sitepoint icon. Valid XHTML 1.0 icon. Valid CSS! icon. Level A conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0