3 declare(strict_types
=1);
6 use PhpMyAdmin\Controllers\JavaScriptMessagesController
;
7 use PhpMyAdmin\OutputBuffering
;
9 if (! defined('ROOT_PATH')) {
10 // phpcs:disable PSR1.Files.SideEffects
11 define('ROOT_PATH', dirname(__DIR__
) . DIRECTORY_SEPARATOR
);
15 if (PHP_VERSION_ID
< 70205) {
16 die('<p>PHP 7.2.5+ is required.</p><p>Currently installed version is: ' . PHP_VERSION
. '</p>');
19 // phpcs:disable PSR1.Files.SideEffects
20 define('PHPMYADMIN', true);
23 require_once ROOT_PATH
. 'libraries/constants.php';
28 if (! @is_readable
(AUTOLOAD_FILE
)) {
30 '<p>File <samp>' . AUTOLOAD_FILE
. '</samp> missing or not readable.</p>'
31 . '<p>Most likely you did not run Composer to '
32 . '<a href="https://docs.phpmyadmin.net/en/latest/setup.html#installing-from-git">'
33 . 'install library files</a>.</p>'
37 require AUTOLOAD_FILE
;
42 header('Content-Type: text/javascript; charset=UTF-8');
44 // Cache output in client - the nocache query parameter makes sure that this file is reloaded when config changes.
45 header('Expires: ' . gmdate('D, d M Y H:i:s', time() +
3600) . ' GMT');
47 $GLOBALS['isMinimumCommon'] = true;
48 // phpcs:disable PSR1.Files.SideEffects
49 define('PMA_PATH_TO_BASEDIR', '../');
50 define('PMA_NO_SESSION', true);
55 $buffer = OutputBuffering
::getInstance();
58 register_shutdown_function(static function (): void
{
59 echo OutputBuffering
::getInstance()->getContents();
62 /** @var JavaScriptMessagesController $controller */
63 $controller = $GLOBALS['containerBuilder']->get(JavaScriptMessagesController
::class);