<?php

$dsn = $GLOBALS['forum_config']['dbtype'] . '://' . $GLOBALS['forum_config']['username'] . ':' . $GLOBALS['forum_config']['password']. '@' . $GLOBALS['forum_config']['hostname'] . '/' . $GLOBALS['forum_config']['database'];

require_once PEAR_DIR . 'DB.php';
$DB_options = array('persistent' => TRUE );
$db = @DB::connect( $dsn, $DB_options );
PEAR::setErrorHandling( PEAR_ERROR_CALLBACK, 'errhndl' );
if (PEAR::isError($db)) {
	die($db->getMessage());
}
$db->setFetchMode( DB_FETCHMODE_ASSOC );
?>