From b2b3886e22f3df54e78084cecb255bbe5ea509f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 18 Jul 2017 12:04:38 +0200 Subject: [PATCH] Fail if ini_set/ini_get are disabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We might support operation without these two later, but it's quite a lot of work and nobody was really requesting this. Fixes #13471 Signed-off-by: Michal Čihař --- ChangeLog | 1 + libraries/common.inc.php | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index 031e2b62f0..7106b53d24 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,7 @@ phpMyAdmin - ChangeLog - issue #13382 Fixed size of index edit dialog - issue #13489 Fixed rendering SQL lint errors - issue #13468 Avoid breakage if set_time_limit is disabled +- issue #13471 Fail if ini_set/ini_get are disabled 4.7.2 (2017-06-29) - issue #13314 Make theme selection keep current server diff --git a/libraries/common.inc.php b/libraries/common.inc.php index 40aba22b72..77889798e8 100644 --- a/libraries/common.inc.php +++ b/libraries/common.inc.php @@ -474,6 +474,19 @@ if (@extension_loaded('mbstring') && !empty(@ini_get('mbstring.func_overload'))) ); } +/** + * The ini_set and ini_get functions can be disabled using + * disable_functions but we're relying quite a lot of them. + */ +if (! function_exists('ini_get') || ! function_exists('ini_set')) { + PMA_fatalError( + __( + 'You have disabled ini_get and/or ini_set in php.ini. ' + . 'This option is incompatible with phpMyAdmin!' + ) + ); +} + /******************************************************************************/ /* setup servers LABEL_setup_servers */