Tips & Tutorials

Joomla Tips & Tutorials

1. Overview

Error Reporting is a useful Joomla function to troubleshoot PHP errors on your Joomla site. This function provides some clues about what and where the PHP problems are.

2. When to turn it on?

Got blank/ white screen in your Joomla site frontend? Well, that calls for turning on the error reporting feature. You may also want to disable the URL rewriting (htaccess method) using Apache mod_rewrite under the SEO settings for differential diagnosis of the issue as url rewriting with htaccess file in non-supported server (mod_rewrite not active) also renders blank pages.

3. How to proceed

In your Admin Panel, navigate through Global Configuration >> Server tab >> Error Reporting.

Joomla Error Reporting

Joomla Error Reporting settings

There are several options for you to choose, namely:

  • System Default : Joomla will inherit error reporting defaults set in the server (usually in php.ini file).
  • None : Choose this option to switch off the Error Reporting so that no notification will be shown. However, when any 3rd party extension overrides Joomla error reporting with their own settings, notifications may still appear.
  • Simple : Overrides server settings to give a basic report with warnings only about the fatal errors.
    Joomla Error Reporting - Simple settings

    Error Reporting in Simple settings

  • Maximum (Recommended) : Overrides server settings to gives full report with all the errors, warnings, notices, deprecated functions call, strict standards on the website.
    Joomla Error Reporting - Maximum settings

    Error Reporting in Maximum settings

Tip : You can enable the Error Reporting with the configuration.php file. Edit the file and add one of the following numeric values for $error_reporting, which equals to the PHP’s error constants:

  • -1 = 0 : No error reporting.
  • 30711 = E_ALL & ~(E_NOTICE|E_WARNING) : All errors reporting. No warnings or notices.
  • 30711 = E_ALL & ~E_NOTICE : All errors and warnings reporting. No notices.
  • 30719 = E_ALL : All errors, warnings and notices reporting.
  • 32767 = E_ALL | E_STRICT : All errors, warnings, notices and strict standards reporting.

4. Recommendations

For developers error reporting gives them a headstart and they know what they have to fix and where. For regular users, it helps to provide more details to the developer instead of saying "I got blank / white page".

Error reporting should be disabled on an live site as the error reports would be visible to your users and information about your website may be revealed including the absolute path of your website.

Turn it on only when something goes wrong such as a blank page and/or you are debugging your Joomla website. Once the bugs are fixed, change the error reporting settings back to “None”. This is highly recommended for any Joomla website in term of security.

5. Live example

Let's see how an error would be reported when your Joomla Error Reporting is ON.

1. Open your_site_root/components/com_content/content.php and remove “;” from line no. 11.

Content.php file

Let's see how the error would be reported

2. Check your front-end. As your Error Reporting is set as "None", it must be just a blank page.

3. Now proceed to turn the Error Reporting to "Maximum" and you can see the exact error.

Joomla Error Reporting

How the errors is reported with Maximum settings

Tada! That's how the Error Reporting works.

6. Joomla extension for Error Reporting

You may find some more useful Joomla extensions for error reporting in our Joomla! Extension Directory. Easy Error Reporting would be a handy choice as you can enable the error reports for specific user groups only.

7. Further reading

BLOG COMMENTS POWERED BY DISQUS