[TYPO3-dev] Database connection
Björn Pedersen
pedersen at frm2.tum.de
Mon May 30 11:55:01 CEST 2011
Am 27.05.2011 21:25, schrieb Stefan Henschke:
> 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?
It actually uses syslog, so normally a user should not see this message.
Björn
More information about the TYPO3-dev
mailing list