Not a developer? Go to MovableType.com

Documentation

DBIRaiseError

This is documentation about a configuration directive, which can be placed within Movable Type’s core configuration file, mt-config.cgi, to customize the behavior of the system.

Boolean setting to display database queries in error messages for debugging purposes.

Disabled by default (since MT4.3 when this config directive was added).

Warning: This setting is only recommended for debugging purposes. Using it in a production environment is not recommended.

In versions prior to MT4.3 a flag in lib/MT/ObjectDriver/Driver/DBI.pm called “RaiseError” bubbles up a database error to the user instead of the message:

"Can't call method "execute" on an undefined value..."

The output depends on the database and how it handles the DBIRaiseError flag. For DBD::mysql, the faulty SQL statement would be shown when DBIRaiseError is set to 1. It should work the same way for the other DBD drivers that interact with DBI. Set DebugMode to 4 to get the full log of other SQL statements previously called.

Bug: Using this config directive may break basic queries when using MS SQL Server, a known issue in MT4.3. Case 101428

Example

To enable more descriptive sql errors, add this to your MT config file:

DBIRaiseError 1
Back