Manual:$wgShowSQLErrors
From MediaWiki.org
| Debug/logging: $wgShowSQLErrors | |
|---|---|
| Whether to show SQL errors on "we're sorry, but there has been a database error" pages. |
|
| Introduced in version: | 1.4.0 |
| Removed in version: | still in use |
| Allowed Values: | (boolean) |
| Default Value: | false |
Other settings: Alphabetical | By Function
When set to 'false' (default) any database error message will also say "(SQL query hidden)" rather than showing the SQL which caused the error.
[edit] 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 do see an error including "(SQL query hidden)", it can be useful to set this to $wgShowSQLErrors=true; temporarily.
This variable replaces $wgIgnoreSQLErrors, which should no longer be used.

