Translated using Weblate (Czech)
[phpmyadmin.git] / show_config_errors.php
blobafb0ba3ee99190519d67287db68cf31a6a2026bb
1 <?php
2 /**
3 * Simple wrapper just to enable error reporting and include config
4 */
5 declare(strict_types=1);
7 if (! defined('ROOT_PATH')) {
8 // phpcs:disable PSR1.Files.SideEffects
9 define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
10 // phpcs:enable
13 // rfc2616 - Section 14.21
14 header('Expires: ' . gmdate(DATE_RFC1123));
15 // HTTP/1.1
16 header(
17 'Cache-Control: no-store, no-cache, must-revalidate,'
18 . ' pre-check=0, post-check=0, max-age=0'
20 if (isset($_SERVER['HTTP_USER_AGENT'])
21 && stripos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false
22 ) {
23 /* FIXME: Why is this special case for IE needed? */
24 header('Pragma: public');
25 } else {
26 header('Pragma: no-cache'); // HTTP/1.0
27 // test case: exporting a database into a .gz file with Safari
28 // would produce files not having the current time
29 // (added this header for Safari but should not harm other browsers)
30 header('Last-Modified: ' . gmdate(DATE_RFC1123));
32 header('Content-Type: text/html; charset=utf-8');
34 // phpcs:disable PSR1.Files.SideEffects
35 define('PHPMYADMIN', true);
36 // phpcs:enable
38 require ROOT_PATH . 'libraries/vendor_config.php';
40 if (function_exists('error_reporting')) {
41 error_reporting(E_ALL);
44 /**
45 * Read config file.
47 if (is_readable(CONFIG_FILE)) {
48 include CONFIG_FILE;