Reading logs and errors
Errors are part of learning. The sooner you can read them, the faster you learn. This page shows where Exponential writes what went wrong and how a learner uses it.
Contents
- Is it an error at all?
- The error page and its reference
- The log files
- The log viewer in the administration
- Check before you look
- A routine for any error
- From error to question
Is it an error at all?
Some pages look like errors but say that something is not allowed or not there (When something goes wrong):
| The page says | It means |
|---|---|
| The requested page could not be displayed. (1) or Your account does not have the proper privileges | Your role may not open this page |
| The requested page could not be displayed. (20) | The address is wrong, or that part is not installed |
| Possible edit conflict | A draft of the item exists already |
| A grayed-out button | You may not use it here or now |
On your own study site as admin, the first one should not appear; for a test account it is often the expected
result of a role exercise (project 9).
The error page and its reference
A real error shows a page such as Something went wrong on our side with a reference at the bottom. The error is already logged; the reference finds that moment in the logs (When something goes wrong, Finding an error by its reference).
Note the reference, the time, the address and what you did just before.
The log files
The logs are in var/log/ of the installation. The ones learners meet most:
| File | What it holds | Source |
|---|---|---|
var/log/error.log | Errors; the first place to look after a white page or a 500 | Getting started |
var/log/warning.log | Warnings, for example about caches | Caches |
var/log/setup.log | The progress of an installation | Getting started |
var/log/security.log | Security events, for example demo mode lines | Demo mode FAQ |
On the command line, the last lines of a log:
tail -n 50 var/log/error.logThe log viewer in the administration
Setup > Log files shows the logs in the browser: choose a file, follow new lines as they are written, filter by
level, search for a word such as an error reference, and open the Error digest for an overview. It needs the
setup/logs policy; personal data such as IP addresses is masked by default
(How do I read the log files?).
Check before you look
Many errors can be caught before you open the browser:
| You changed | Check | Expected | Source |
|---|---|---|---|
| A PHP file | php -l <file> | No syntax errors detected in <file> | Extensions |
| A template | php bin/php/eztemplatecheck.php -s<siteaccess> <file> --allow-root-user | Template file valid: <file> | Templates and design |
| Classes of an extension | php bin/php/checkclasses.php --quiet-ok --allow-root-user | No output when everything loads | Extensions |
| A setting | php bin/php/console exp:ini where <file/Block/Variable> <siteaccess> | The value in effect | Understanding siteaccesses and settings |
Template path comments show which template wrote which markup (Templates and design).
A routine for any error
- Read the message. Copy it exactly into your study journal.
- Read the log.
var/log/error.log, the newest lines. - Undo the last change in your mind: what did you change just before? Most errors come from the last step.
- Run the checks above for the files you touched.
- Rule out caches (Understanding caches).
- Search the help for the message, then the issue trackers.
- Ask, with the facts you collected.
From error to question
A good question or bug report has: what you did, step by step; what you expected; what happened, with the exact
message; and the environment (Exponential and PHP versions, the web server, the database). The help's Report an
error page and php bin/php/console exp:info --plain --no-logo give you a summary of the installation that leaves out
passwords, keys and server paths (When something goes wrong).
See Asking for help and study groups and Bugs you find while learning.
Related pages
- When something goes wrong
- Understanding caches
- Troubleshooting
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.