Index: t3lib/class.t3lib_db.php =================================================================== --- t3lib/class.t3lib_db.php (revision 7449) +++ t3lib/class.t3lib_db.php (working copy) @@ -1081,10 +1081,8 @@ // check if MySQL extension is loaded if (!extension_loaded('mysql')) { - $header = 'Database Error'; - $message = 'It seems that MySQL support for PHP is not installed!'; - t3lib_timeTrack::debug_typo3PrintError($header, $message, false, t3lib_div::getIndpEnv('TYPO3_SITE_URL')); - exit; + $message = 'Database Error: It seems that MySQL support for PHP is not installed!'; + throw new RuntimeException($message, 1271492606); } // Check for client compression Index: typo3/sysext/cms/tslib/class.tslib_fe.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_fe.php (revision 7449) +++ typo3/sysext/cms/tslib/class.tslib_fe.php (working copy) @@ -487,7 +487,16 @@ * @return void */ function connectToDB() { - if ($GLOBALS['TYPO3_DB']->sql_pconnect(TYPO3_db_host, TYPO3_db_username, TYPO3_db_password)) { + try { + $link = $GLOBALS['TYPO3_DB']->sql_pconnect(TYPO3_db_host, TYPO3_db_username, TYPO3_db_password); + } catch (RuntimeException $e) { + if (TYPO3_db) { + // Database is defined, this should normally not happen, user should be informed + throw $e; + } + $link = FALSE; + } + if ($link !== FALSE) { if (!TYPO3_db) { $this->printError('No database selected','Database Error'); // Redirects to the Install Tool: