Setting Mediawiki’s LDAP authentication and mail functionality while it is running in an OpenBSD’s nginx chroot took some time to debug and prepare.
As always, the first thing should be the set-up of a log:
$wgDebugLogFile = “../logs/mediawiki/debug-{$wgDBname}.log”;
error_reporting( -1 );
ini_set( ‘display_errors’, 1 );