diff --git a/ChangeLog b/ChangeLog
index b63733c840..3054cfd51f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,8 @@ phpMyAdmin - ChangeLog
- issue #13327 Fixed Incorrect NavigationTreeEnableExpansion default value in the documentation
- issue #13008 Fixed export of database with a lot of tables
- issue #13318 Improved performance when importing with enabled tracking
+- issue #13386 Avoid PHP errors with non existing configuration on OS X
+- issue #13388 Show only supported charsets for conversion
4.7.1 (2017-05-25)
- issue #13132 Always execute tracking queries as controluser
diff --git a/libraries/Config.php b/libraries/Config.php
index 0c19bd70f2..a52d8fbe16 100644
--- a/libraries/Config.php
+++ b/libraries/Config.php
@@ -1137,7 +1137,7 @@ class Config
public function checkPermissions()
{
// Check for permissions (on platforms that support it):
- if ($this->get('CheckConfigurationPermissions')) {
+ if ($this->get('CheckConfigurationPermissions') && @file_exists($this->getSource())) {
$perms = @fileperms($this->getSource());
if (!($perms === false) && ($perms & 2)) {
// This check is normally done after loading configuration
diff --git a/libraries/Encoding.php b/libraries/Encoding.php
index 700c40c324..8157e1e422 100644
--- a/libraries/Encoding.php
+++ b/libraries/Encoding.php
@@ -325,4 +325,20 @@ class Encoding
. '
'
. '';
}
-}
\ No newline at end of file
+
+ public static function listEncodings()
+ {
+ if (is_null(self::$_engine)) {
+ self::initEngine();
+ }
+ /* Most engines do not support listing */
+ if (self::$_engine != self::ENGINE_MB) {
+ return $GLOBALS['cfg']['AvailableCharsets'];
+ }
+
+ return array_intersect(
+ array_map('strtolower', mb_list_encodings()),
+ $GLOBALS['cfg']['AvailableCharsets']
+ );
+ }
+}
diff --git a/libraries/display_export.lib.php b/libraries/display_export.lib.php
index 36f2d77b15..c4a1614e41 100644
--- a/libraries/display_export.lib.php
+++ b/libraries/display_export.lib.php
@@ -639,7 +639,7 @@ function PMA_getHtmlForExportOptionsOutputCharset()
$html = '