[TYPO3-dev] Database connection

Stefan Henschke henschke.stefan at googlemail.com
Fri May 27 21:25:35 CEST 2011


On Fri, 27 May 2011 19:04:50 +0000, Stefan Henschke wrote:
> Is this right? Wouldn't it be better to use an if statement, so we check
> if the connection couldn't be established? "if (this->link == FALSE) {
> ... }"

My fault, errors are catched on line 1186.

"if (!$this->link) {
			t3lib_div::sysLog('Could not connect to MySQL 
server ' . $TYPO3_db_host .
					' with user ' . 
$TYPO3_db_username . ': ' . $error_msg,
				'Core',
				4
			);
		} else {...}"

I would suggest to include a mailadress in the localconf.php, for error 
reports like this. The user should see something like "Site temporary not 
available, please try again later.". I don't think that the user should 
see the database username.

Mysqli and pdo aren't used because of the history of the project, right?




More information about the TYPO3-dev mailing list