Manual:$wgShowSQLErrors/fr
File:OOjs UI icon alert-destructive.svg | <translate> This feature was removed completely in version <tvar name=ver>1.37.0</tvar>.</translate> |
<translate> Debug</translate>: $wgShowSQLErrors | |
---|---|
Indique s'il faut afficher les erreurs SQL sur les pages « we're sorry, but there has been a database error » . |
|
<translate> Introduced in version:</translate> | 1.4.0 (r7376) |
<translate> Deprecated in version:</translate> | 1.32.0 (Gerrit change 446370; git #807125ab) |
<translate> Removed in version:</translate> | 1.37.0 (Gerrit change 704395; git #f90ecdfa) |
<translate> Allowed values:</translate> | (booléen) |
<translate> Default value:</translate> | false |
<translate> Other settings:</translate> <translate> Alphabetical</translate> | <translate> By function</translate> |
Quand il vaut false
(par défaut) tout message d'erreur de base de données affichera aussi « (SQL query hidden) » plutôt que présenter le code SQL qui a causé l'erreur.
Vous ne verrez donc que « A database query error has occurred.
This may indicate a bug in the software. ».
Mettez $wgShowSQLErrors
à true
pour voir la requête actuelle qui a causé l'erreur.
Dans MediaWiki 1.32, ce paramètre est obsolète et il est non opérationnel depuis. Utilisez Manuel:$wgShowExceptionDetails et Manuel:$wgShowHostnames à la place.
Détails
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.
Cette variable remplace $wgIgnoreSQLErrors , qui a été supprimé.
Voir aussi
- MediaWiki configuration settings/fr
- MediaWiki configuration settings introduced in version 1.4.0/fr
- MediaWiki configuration settings deprecated in version 1.32.0/fr
- MediaWiki configuration settings removed in version 1.37.0/fr
- Pages with broken file links
- MediaWiki deprecated or obsolete features/fr
- Debug variables/fr