Skip to content
ONDI

← All terms

Settings

display_errors

The setting that decides whether error messages are shown to visitors. Turning it off (Off) does not stop the PHP2Shell attack.

When a PHP program hits an error, the details can either be shown on the visitor's screen or hidden. The setting that decides this is display_errors. Error messages can reveal folder locations inside the server or the names of programs, so on a live site it is normally turned off (Off). It is like drawing a curtain so customers cannot see into the workshop at the back of the shop.

Watch out Drawing the curtain does not fix the lock on the back door: turning display_errors off does not stop the PHP2Shell attack. PHP's official announcement also says that a setting which hides error messages cannot prevent it. It helps to make sure the errors hidden from the screen are still written to the error log (a record file), so you can track problems down. The real fix is updating PHP to a patched version.

Source: PHP Manual, “Errors and Logging Configuration” · PHP Group, “Security advisory: Critical remote code execution vulnerabilities, update now” (checked 2026-10-26)

See also

A typo here, a clumsy button there.

This site is still being polished. Spot something? Tell us — we’ll fix it and send a small thank-you gift.

🎁 Thank-you gift