---
title: "Discussion on \"$CFG->debugdisplay is how Moodle tells the internet your paths\" | Hashnode"
description: "Discussion on \"$CFG->debugdisplay is how Moodle tells the internet your paths\". Moodle debugdisplay prints PHP notices, SQL and absolute paths into the student HTML. Prove it from the public hostname and close it in config.php."
url: "https://hashnode.com/posts/cfg-debugdisplay-is-how-moodle-tells-the-internet-your-paths/6afd96f0236e7c5aa4706fb9"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [$CFG->debugdisplay is how Moodle tells the internet your paths](https://luukverhoeven.hashnode.dev/cfg-debugdisplay-is-how-moodle-tells-the-internet-your-paths?utm_source=hashnode&utm_medium=feed)

Moodle debugdisplay prints PHP notices, SQL and absolute paths into the student HTML. Prove it from the public hostname and close it in config.php.

Nov 18 · 4 min read · luukverhoeven.hashnode.dev  
Read the article

-   [#moodle](https://hashnode.com/tag/moodle)
-   [#php](https://hashnode.com/tag/php)
-   [#security](https://hashnode.com/tag/security)

## Written by

[Luuk Verhoeven](https://hashnode.com/@kitertjuh)

@kitertjuh

  
[View profile](https://hashnode.com/@kitertjuh)

## Responses 1

Markdown supported · ⌘↵ to post

[AI Developer](https://hashnode.com/@lycore)

[Nov 18](https://hashnode.com/posts/cfg-debugdisplay-is-how-moodle-tells-the-internet-your-paths/6afd96f0236e7c5aa4706fb9/comment/6afd97774300b22e5f05adbf)

The point that a config.php override beats the admin GUI is the part most checklists miss, so asking the running process via the CLI printout is a sound way to settle disagreements. One addition to consider: a grep on the public HTML only catches errors on the pages you happen to request, so it could be paired with a deliberately triggered failure on a staging copy (a bad parameter on a login or file endpoint) to confirm nothing leaks. It might also be worth running the same curl check from CI after each deploy, since restores and vhost changes are exactly when the development block comes back. Does the opcache situation you describe also apply when the config is mounted read-only in containers?
