diff --git a/changelog.php b/changelog.php index 7b8c6f3ec..637efd105 100644 --- a/changelog.php +++ b/changelog.php @@ -15,13 +15,19 @@ require('./libraries/vendor_config.php'); /** * Read changelog. */ -if (substr(CHANGELOG_FILE, -3) == '.gz') { - ob_start(); - readgzfile(CHANGELOG_FILE); - $changelog = ob_get_contents(); - ob_end_clean(); +// Check if the Changelog file is available, some distributions remove these. +if (is_readable(CHANGELOG_FILE)) { + if (substr(CHANGELOG_FILE, -3) == '.gz') { + ob_start(); + readgzfile(CHANGELOG_FILE); + $changelog = ob_get_contents(); + ob_end_clean(); + } else { + $changelog = file_get_contents(CHANGELOG_FILE); + } } else { - $changelog = file_get_contents(CHANGELOG_FILE); + echo "The Changelog file is not available on this system, please visit www.phpmyadmin.net for more information."; + exit; } /** diff --git a/license.php b/license.php index 029461129..6d638781d 100644 --- a/license.php +++ b/license.php @@ -19,5 +19,14 @@ require('./libraries/vendor_config.php'); * */ header('Content-type: text/plain; charset=iso-8859-1'); -readfile(LICENSE_FILE); + +$filename = LICENSE_FILE; + +// Check if the file is available, some distributions remove these. +if (is_readable($filename)) { + readfile($filename); +} else { + echo "The $filename file is not available on this system, please visit www.phpmyadmin.net for more information."; +} + ?>