Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 41 lines (36 sloc) 1.039 kb
7b48016 @nijel Add wrapper to show config errors even with no error reporting (RFE #…
nijel authored
1 <?php
817e790 synced/fixed vim line
Sebastian Mendel authored
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
374abd5 fixed/added page level docblock
Sebastian Mendel authored
3 /**
4 * Simple wrapper just to enable error reporting and include config
5 *
e56949f @nijel Use package name PhpMyAdmin
nijel authored
6 * @package PhpMyAdmin
374abd5 fixed/added page level docblock
Sebastian Mendel authored
7 */
7b48016 @nijel Add wrapper to show config errors even with no error reporting (RFE #…
nijel authored
8
98a1b4c @nijel Wrap long lines, move comments, remove unused code
nijel authored
9 // rfc2616 - Section 14.21
10 header('Expires: ' . date(DATE_RFC1123));
11 // HTTP/1.1
12 header(
13 'Cache-Control: no-store, no-cache, must-revalidate,'
14 . ' pre-check=0, post-check=0, max-age=0'
15 );
ea65b80 Fix show_config_errors.php
Jo Michael authored
16 if (isset($_SERVER['HTTP_USER_AGENT'])
4b8d52d @madhuracj Fix CheckStyle warnings, Type:CloseBracketNewLine (Closing parenthesi…
madhuracj authored
17 && stristr($_SERVER['HTTP_USER_AGENT'], 'MSIE')
18 ) {
ea65b80 Fix show_config_errors.php
Jo Michael authored
19
20 /* FIXME: Why is this special case for IE needed? */
21 header('Pragma: public');
22 } else {
23 header('Pragma: no-cache'); // HTTP/1.0
24 // test case: exporting a database into a .gz file with Safari
25 // would produce files not having the current time
26 // (added this header for Safari but should not harm other browsers)
27 header('Last-Modified: ' . date(DATE_RFC1123));
28 }
e92125b @nijel Prevent caching of showing errors of config file
nijel authored
29 header('Content-Type: text/html; charset=utf-8');
30
b2fd866 Leading ./ paths for includes can be omitted, part 2
Jo Michael authored
31 require 'libraries/vendor_config.php';
7b75439 @nijel Provide way for vendors to easily change paths to config files.
nijel authored
32
7b48016 @nijel Add wrapper to show config errors even with no error reporting (RFE #…
nijel authored
33 error_reporting(E_ALL);
56941e5 @nijel Adding @package, second part.
nijel authored
34 /**
35 * Read config file.
36 */
c51817d @lem9 [security] Fixed local path disclosure vulnerability, see PMASA-2012-2
lem9 authored
37 if (is_readable(CONFIG_FILE)) {
d844827 @ruleant use include with conditional includes
ruleant authored
38 include CONFIG_FILE;
c51817d @lem9 [security] Fixed local path disclosure vulnerability, see PMASA-2012-2
lem9 authored
39 }
7b48016 @nijel Add wrapper to show config errors even with no error reporting (RFE #…
nijel authored
40 ?>
Something went wrong with that request. Please try again.