Handbuch:$wgShowSQLErrors
Diese Funktion wurde in der Version 1.37.0 vollständig entfernt. |
Debug: $wgShowSQLErrors | |
---|---|
Whether to show SQL errors on "we're sorry, but there has been a database error" pages. |
|
Eingeführt in Version: | 1.4.0 (r7376) |
Veraltet in Version: | 1.32.0 (Gerrit change 446370; git #807125ab) |
Entfernt in Version: | 1.37.0 (Gerrit change 704395; git #f90ecdfa) |
Erlaubte Werte: | (Wahrheitswert) |
Standardwert: | false |
Andere Einstellungen: Alphabetisch | Nach Funktion |
When set to false
(default) any database error message will also say "(SQL query hidden)" rather than showing the SQL which caused the error.
Du wirst dann nur "Es ist ein Datenbankabfragefehler aufgetreten.
Dies könnte auf einen Fehler in der Software hindeuten." sehen.
Set $wgShowSQLErrors
to true
to see the actual query, which caused the error.
In MediaWiki 1.32, this setting got deprecated and is nonfunctional since then. Verwende stattdessen Handbuch:$wgShowExceptionDetails und Handbuch:$wgShowHostnames !
Details
Clearly showing the SQL will aid in debugging in the event of a database error, however...
- Showing SQL to all users, will give crackers some clues about the database structure of your website, and might help them find security weaknesses.
- SQL database errors are not supposed to occur during any normal MediaWiki operation, and so with luck you will never need to improve the error information
- If you receive the error
internal_api_error_DBQueryError
from the API, enabling this setting will display a more descriptive error message in the info field than the defaultDatabase query error
.
If you do see an error including "(SQL query hidden)", it can be useful to set this to $wgShowSQLErrors = true;
temporarily.
This variable replaces $wgIgnoreSQLErrors , which has been removed.