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

Debug output in production

For administrators of public sites - why debug output must stay off in production, Exponential's debug settings and their safe defaults, how to debug a live problem for your own address only and remove it again, and…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/government/security/debug-output-in-production.md

On this page

Debug output in production

This page is for administrators and developers. Debug reports show SQL, file paths, template names and timings: useful while developing, a map for an attacker on a public site (13.4 Debug output and error display).

Contents

  1. The safe defaults
  2. Debugging a live problem
  3. PHP itself
  4. Checking
  5. Related pages

The safe defaults

settings/site.ini [DebugSettings] as shipped:

SettingShippedMeaning
DebugOutputdisabledno debug report on pages
AlwaysLog[]errorerrors still written to the error log
ScriptDebugOutputdisabledcommand-line scripts
DebugByIPdisabledwhen enabled: only DebugIPList[] addresses get debug
DebugByUserdisabledwhen enabled: only DebugUserIDList[] users
DisplayDebugWarningsdisabled

and [TemplateSettings] Debug=disabled (no template names in the HTML).

Debugging a live problem

Only when you must, only for your own address, and remove it again the same day:

# settings/override/site.ini.append.php
[DebugSettings]
DebugOutput=enabled
DebugByIP=enabled
DebugIPList[]
DebugIPList[]=203.0.113.10
  • Entries may be single addresses or CIDR ranges, IPv4 and IPv6; the debug bar documents labels and expiry dates on entries (The Exp Debug bar).
  • DebugByIP trusts the address Exponential determines; behind a proxy it comes from a forwarded header only when the proxy is in TrustedProxies[]. A range wider than your proxies, or an entry for the proxy's own address, gives debug output to everyone.
  • The debug bar's settings tab can change these values and needs setup/setup.
  • Setting writes are recorded in the audit (system.setting.write), so a forgotten debug switch can be found: /audit/console/(name)/system.setting.write.

A safer alternative for many problems: find the error by its reference in the log viewer (Finding an error by its reference).

PHP itself

In the php.ini of PHP-FPM: display_errors=Off, log_errors=On, expose_php=Off. Velocity ships display_errors=Off and log_errors=On for FrankenPHP; for the qbix engine add them to settings/override/velocity.ini.append.php [PHPSettings] IniOptions[] if your CLI php.ini displays errors.

Checking

./console exp:ini get site.ini/DebugSettings/DebugOutput --allow-root-user
curl -s https://www.example.gov/ | grep -i -c 'debug'          # from an address not in the list
curl -sI https://www.example.gov/ | grep -i x-powered-by        # nothing with expose_php=Off

Add DebugOutput=disabled to your go-live checklist and your monthly review.

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.

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