Websites inevitably have problems. Whether you're using Joomla or anything else, you'll need to spot and fix problems.
Joomla uses PHP and when PHP has problems, it tries to report them to you. These errors may appear on your site and could be visible to visitors.
In this tutorial, we're going to give you a quick introduction to these errors. We'll explain the different types that might appear on your site and how you can stop them from showing.
The image below has an example of messages showing on your site:
The three different kinds of PHP messages
There are three main ways in which PHP will report problems: notices, warnings and errors. Here's the difference between those three types of issue:
What are PHP Notices?
These are the least important. According to the official PHP website, notices are generated when:
"the script encountered something that could indicate an error, but could also happen in the normal course of running a script."
What are PHP Warnings?
Warnings are more serious but probably won't break your site. According to the official PHP website, warnings are:
"non-fatal errors. Execution of the script is not halted."
What are PHP Errors?
Errors are the most serious type of problem and may break your site. According to the official PHP website, errors are:
"Fatal run-time errors. These indicate errors that can not be recovered from, such as a memory allocation problem. Execution of the script is halted."
Option #1: Disabling Error Reporting on Your Joomla Site
One solution, and probably the one you'll take first, is to stop the errors from showing.
- Go to Site > Global Configuration > Server > Error Reporting.
- You have five choices:
- System Default: this allows error reporting to be determined by the php.ini file on your server.
- None will disable all error reporting.
- Simple will show Errors and Warnings but won't show Notices.
- Maximum will show Errors, Warnings and Notices.
- Development will literally overwhelm you with feedback. If you're not a developer, please don't use this option.
Option #2: Fix the Problem
Yes, yes, I know this is a controversial idea. Fixing a problem is definitely harder than hiding a problem.
Here are some suggestions to help you fix the problem. Please backup your site before trying any of these.
- Make sure your Joomla site and all your extensions and templates are up-to-date.
- Search Google and Joomla.org for anyone who has reported the same message. See if they have found a solution.
- Read the message itself for hints about the problem. Often the message will contain the name of the extension or template that is causing problems. Disable that extension or template to see if that fixes the problem.