Please tell me, how exactly does the combination of php and php-fpm configs work?
The situation is this: in php.ini, I set the directive disable_classes = ReflectionClass, in the php.conf (php-fpm) file php_admin_value[disable_classes] = 'ReflectionFunction'.
In my understanding, I redefined the directive in the pool. I check by opening the page in the browser with phpinfo(), I see that in the row disable_classes, value and master_value are ReflectionFunction. I call the ReflectionClass and ReflectionFunction classes in turn, and I get two warnings that they are off.
Why are the values combined, and the most curious thing is why do I see only one disabled class in phpinfo?
P.S. I asked this question on Stack Overflow на русском as well.
1 Answer 1
The description of this configuration in the manual is:
PHP settings passed with php_value or php_flag will overwrite their previous value. Please note that defining disable_functions or disable_classes will not overwrite previously defined php.ini values, but will append the new value instead.
The first sentence is correct, but perhaps the second sentence is meant to help you better understand. Actually zend first deletes the functions listed in ini's disable_functions directive from the function table (see zend_disable_function), and then deleted the functions listed in the fpm configuration, so it appears to have appended this value, but the value in the ini entries is overwritten.
php-7_4.conf