From 3038fcbe30c3cd1a4ed96486a642a3d616b45ea6 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Wed, 3 Dec 2025 17:57:03 +0100 Subject: [PATCH] Fix GH-19018: php_admin_value disable_functions ignored This happens because disable_functions are not explicitly disabled. The fix explicitly calls zend_disable_functions when config is applied. --- sapi/apache2handler/apache_config.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sapi/apache2handler/apache_config.c b/sapi/apache2handler/apache_config.c index e051964a81591..cd05ae7e099c2 100644 --- a/sapi/apache2handler/apache_config.c +++ b/sapi/apache2handler/apache_config.c @@ -200,6 +200,9 @@ void apply_config(void *dummy) if (zend_alter_ini_entry_chars(str, data->value, data->value_len, data->status, data->htaccess?PHP_INI_STAGE_HTACCESS:PHP_INI_STAGE_ACTIVATE) == FAILURE) { phpapdebug((stderr, "..FAILED\n")); } + if (zend_string_equals_literal(str, "disable_functions") && *data->value) { + zend_disable_functions(data->value); + } } ZEND_HASH_FOREACH_END(); }