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