This section contains detailed articles elaborating on some of the common issues phpBB users encounter while using the product. Articles submitted by members of the community are checked for accuracy by the relevant phpBB Team. If you do not find the answer to your question here, we recommend looking through the Support Section as well as using the Site Wide Search.

Enabling debug mode

Description: How to enable debug mode for phpBB 3.2+

In Categories:

Link to this article: Select All
[url=]Knowledge Base - Enabling debug mode[/url]

There are several debug options which can be enabled to show information which is normally hidden or limited. In previous versions of phpBB, it was possible to put the board into debug mode by adding a simple constant to config.php. It is a bit more complicated with phpBB 3.2 and newer versions.

As of phpBB 3.2.11 and 3.3.2, the current set of debug options are:
  • exceptions: Only used by the CLI installer to show more verbose error output.
  • load_time: Computes the amount of time that was spent by the database and PHP to execute the code for the current page. These values are shown in the footer.
  • sql_explain: Adds SQL query metrics and a link in the footer of all pages, which when clicked which will show all of the SQL queries that were issued for that page and how long each one took. This link and page are only visible to board administrators. Additionally, this setting will cause SQL errors to show the full backtrace to all users instead of only administrators. This can be useful if your board is generating an error only when users are logged out.
  • memory: Shows the board's peak memory usage in the footer as well as if GZip compression is enabled. If the board makes use of the "Limit system load" feature, then the system's current load will be show as well.
  • show_errors: Sets the PHP error level to show all errors. As of PHP 5.3, PHP suppresses: Notice, Strict, and Deprecated errors by default. Note that your PHP configuration must still enable display_errors before they will show on the screen. Errors will still be logged to PHP's configured error_log.
By default, these values are all set to false. To change their values, edit config/production/config.yml to look like this:

Code: Select all

    - { resource: ../default/config.yml }

    debug.exceptions: true
    debug.load_time: true
    debug.sql_explain: true
    debug.memory: true
    debug.show_errors: true
Be sure to use spaces and not tabs. It is only necessary to add the lines for the settings you wish to enable.

In order for changes to these values to go into effect, the cache must be purged.