Errors, logging and performance · Question 3 of 12

Why should the application context Production be set on a live server?

1 answer is correct. Easy

Show answer

Answer

  • B So that visitors only see a generic message on errors and no details such as file paths or SQL queries

Explanation

In the Production context the frontend only shows a short message such as Oops, an error occurred! Code: … on an error, only errors are logged, and deprecations are not recorded. In the Development context, by contrast, detailed error messages with file and line appear – handy during development, but a security risk on a public server because they reveal internals of the installation. Development neither disables caches nor blocks the frontend or backend; it mainly changes how much is revealed about errors. In production you find the exact error via the displayed code in the log files under var/log/.

Certifications & exams

Which exam comes next?

You can already practise for 19 exams, and 21 are up for a vote. See all certifications with their official information, cast your vote or suggest your exam.

See all certifications