show_config_errors.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * Simple wrapper just to enable error reporting and include config
  5. *
  6. * @package PhpMyAdmin
  7. */
  8. // rfc2616 - Section 14.21
  9. header('Expires: ' . gmdate(DATE_RFC1123));
  10. // HTTP/1.1
  11. header(
  12. 'Cache-Control: no-store, no-cache, must-revalidate,'
  13. . ' pre-check=0, post-check=0, max-age=0'
  14. );
  15. if (isset($_SERVER['HTTP_USER_AGENT'])
  16. && stristr($_SERVER['HTTP_USER_AGENT'], 'MSIE')
  17. ) {
  18. /* FIXME: Why is this special case for IE needed? */
  19. header('Pragma: public');
  20. } else {
  21. header('Pragma: no-cache'); // HTTP/1.0
  22. // test case: exporting a database into a .gz file with Safari
  23. // would produce files not having the current time
  24. // (added this header for Safari but should not harm other browsers)
  25. header('Last-Modified: ' . gmdate(DATE_RFC1123));
  26. }
  27. header('Content-Type: text/html; charset=utf-8');
  28. require 'libraries/vendor_config.php';
  29. if (function_exists('error_reporting')) {
  30. error_reporting(E_ALL);
  31. }
  32. /**
  33. * Read config file.
  34. */
  35. if (is_readable(CONFIG_FILE)) {
  36. include CONFIG_FILE;
  37. }