Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

error.ini [ErrorSettings-kernel]

The settings of [ErrorSettings-kernel] in error.ini: ErrorHandler, RedirectURL, RerunURL, EmbedURL, HTTPError

Download as PDF

Address: https://doc.exponential.earth/learninminutes/exphelp/viewer/examples/ini-settings/error/ErrorSettings-kernel.md

On this page

error.ini [ErrorSettings-kernel]

The block [ErrorSettings-kernel] of settings/error.ini, with 5 setting(s).

Error handling for kernel errors

Never edit settings/error.ini itself: an update replaces it. Put the settings you change in an override, which wins over the shipped file:

  • settings/override/error.ini.append.php for every siteaccess,
  • settings/siteaccess/<siteaccess>/error.ini.append.php for one siteaccess,
  • extension/<extension>/settings/error.ini.append.php in an extension (read when the extension is active).

ErrorHandler

A list of error codes and which handler to use for it
Overrides DefaultErrorHandler
Example:
What to do when a module does not exists, use either displayerror or redirect
ErrorHandler[20]=displayerror
Set access denied to embed login

Default: a hash of 1: 1=embed.

<?php /* #?ini charset="utf-8"?
# settings/override/error.ini.append.php
[ErrorSettings-kernel]
# an empty "ErrorHandler[]" first replaces the shipped list; without it the items are added
ErrorHandler[]
ErrorHandler[1]=embed
*/ ?>

RedirectURL

A list of error codes and the url for redirection.
Redirection tells the browser to choose another url for display.
Overrides DefaultRedirectURL
Example:
Redirect to user/login if access was denied
RedirectURL[1]=/user/login

Default: an empty list.

<?php /* #?ini charset="utf-8"?
# settings/override/error.ini.append.php
[ErrorSettings-kernel]
# an empty "RedirectURL[]" first replaces the shipped list; without it the items are added
RedirectURL[]
*/ ?>

RerunURL

A list of error codes and the url for rerunning.
Rerunning means executing another module and view
as though that module was specified in the browser url.
Overrides DefaultRerunURL
Example:
Rerun user/login if access was denied
RerunURL[1]=/user/login

Default: an empty list.

<?php /* #?ini charset="utf-8"?
# settings/override/error.ini.append.php
[ErrorSettings-kernel]
# an empty "RerunURL[]" first replaces the shipped list; without it the items are added
RerunURL[]
*/ ?>

EmbedURL

A list of error codes and the url for embedding.
Embedding means running the module as in rerun but
the result of the module is sent to the error template
and embedded.
Overrides DefaultEmbedURL
Example:
Embed user/login if access was denied
EmbedURL[1]=/user/login

Default: a hash of 1: 1=/user/login.

<?php /* #?ini charset="utf-8"?
# settings/override/error.ini.append.php
[ErrorSettings-kernel]
# an empty "EmbedURL[]" first replaces the shipped list; without it the items are added
EmbedURL[]
EmbedURL[1]=/user/login
*/ ?>

HTTPError

Defines the HTTP error code to use for the specified Exponential error code.
The definition is HTTPError[Exponential error code]=HTTP error code.
The HTTP error code must be defined with a HTTPError-code group as seen below.
Example:
Add 404 for module not found error
HTTPError[20]=404
301 = moved permanently

Default: a hash of 8: 1=401, 2=404, 3=404, 4=301, 6=403, 20=404, 21=404, 22=404.

<?php /* #?ini charset="utf-8"?
# settings/override/error.ini.append.php
[ErrorSettings-kernel]
# an empty "HTTPError[]" first replaces the shipped list; without it the items are added
HTTPError[]
HTTPError[1]=401
HTTPError[2]=404
HTTPError[3]=404
HTTPError[4]=301
HTTPError[6]=403
HTTPError[20]=404
HTTPError[21]=404
HTTPError[22]=404
*/ ?>

Generated by ./console exp:help:examples from settings/error.ini. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x