Khanh Hoang - Kenn
Kenn is a user experience designer and front end developer who enjoys creating beautiful and usable web and mobile experiences.
Websites will run into problems. Whether you're using Drupal or any other software, there will be problems at some point.
Drupal runs on PHP and when PHP has problems, it reports them to you. However, often these errors will appear on your site and will 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.
There are three main ways in which PHP will report problems: notices, warnings and errors.
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."
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."
Errors are the most serious type of problem and may break your site. According to the official PHP website, warnings 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."
One the solution, and probably the one you'll take first, is to stop the errors from showing.
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.