1

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?


enter image description here


P.S. I asked this question on Stack Overflow на русском as well.

TylerH
21.3k85 gold badges84 silver badges122 bronze badges
asked Dec 8, 2025 at 10:44
2
  • Consider a function depending on a class/module. Can you be more precise about your question? It is not clear for me what you are actually trying to achieve. Commented Dec 8, 2025 at 11:14
  • Please don't let me ask why the configuration file is called php-7_4.conf Commented Dec 8, 2025 at 16:21

1 Answer 1

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.

answered Dec 8, 2025 at 12:05
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.