‪TYPO3CMS  10.4
Mysqli.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
22 
35 {
42  {
43  $this->‪checkPhpExtensions('mysqli');
45 
46  return $this->‪getMessageQueue();
47  }
48 
53  {
54  $currentMysqliReconnectSetting = ini_get('mysqli.reconnect');
55  if ($currentMysqliReconnectSetting === '1') {
56  $this->‪getMessageQueue()->enqueue(new ‪FlashMessage(
57  'mysqli.reconnect=1' . LF
58  . 'PHP is configured to automatically reconnect the database connection on disconnection.' . LF
59  . ' Warning: If (e.g. during a long-running task) the connection is dropped and automatically reconnected, '
60  . ' it may not be reinitialized properly (e.g. charset) and write mangled data to the database!',
61  'PHP mysqli.reconnect is enabled',
63  ));
64  } else {
65  $this->‪getMessageQueue()->enqueue(new ‪FlashMessage(
66  '',
67  'PHP mysqli.reconnect is fine'
68  ));
69  }
70  }
71 }
‪TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Driver\AbstractDriver\checkPhpExtensions
‪checkPhpExtensions(string $extension)
Definition: AbstractDriver.php:58
‪TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Driver\Mysqli\checkMysqliReconnectSetting
‪checkMysqliReconnectSetting()
Definition: Mysqli.php:52
‪TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Driver\Mysqli
Definition: Mysqli.php:35
‪TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Driver\Mysqli\getStatus
‪FlashMessageQueue getStatus()
Definition: Mysqli.php:41
‪TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Driver\AbstractDriver\getMessageQueue
‪getMessageQueue()
Definition: AbstractDriver.php:39
‪TYPO3\CMS\Core\Messaging\FlashMessage
Definition: FlashMessage.php:24
‪TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Driver
Definition: AbstractDriver.php:18
‪TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Driver\AbstractDriver
Definition: AbstractDriver.php:29
‪TYPO3\CMS\Core\Messaging\FlashMessageQueue
Definition: FlashMessageQueue.php:29
‪TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR
‪const ERROR
Definition: AbstractMessage.php:31