‪TYPO3CMS  ‪main
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 
23 
36 {
41  {
42  $this->‪checkPhpExtensions('mysqli');
44 
45  return $this->‪getMessageQueue();
46  }
47 
52  {
53  $currentMysqliReconnectSetting = ini_get('mysqli.reconnect');
54  if ($currentMysqliReconnectSetting === '1') {
55  $this->‪getMessageQueue()->enqueue(new ‪FlashMessage(
56  'mysqli.reconnect=1' . LF
57  . 'PHP is configured to automatically reconnect the database connection on disconnection.' . LF
58  . ' Warning: If (e.g. during a long-running task) the connection is dropped and automatically reconnected, '
59  . ' it may not be reinitialized properly (e.g. charset) and write mangled data to the database!',
60  'PHP mysqli.reconnect is enabled',
61  ContextualFeedbackSeverity::ERROR
62  ));
63  } else {
64  $this->‪getMessageQueue()->enqueue(new ‪FlashMessage(
65  '',
66  'PHP mysqli.reconnect is fine'
67  ));
68  }
69  }
70 }
‪TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Driver\AbstractDriver\checkPhpExtensions
‪checkPhpExtensions(string $extension)
Definition: AbstractDriver.php:56
‪TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Driver\Mysqli\getStatus
‪getStatus()
Definition: Mysqli.php:40
‪TYPO3\CMS\Core\Type\ContextualFeedbackSeverity
‪ContextualFeedbackSeverity
Definition: ContextualFeedbackSeverity.php:25
‪TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Driver\Mysqli\checkMysqliReconnectSetting
‪checkMysqliReconnectSetting()
Definition: Mysqli.php:51
‪TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Driver\Mysqli
Definition: Mysqli.php:36
‪TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Driver\AbstractDriver\getMessageQueue
‪getMessageQueue()
Definition: AbstractDriver.php:39
‪TYPO3\CMS\Core\Messaging\FlashMessage
Definition: FlashMessage.php:27
‪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