Answer the question
In order to leave comments, you need to log in
How does fastcgi_param php_admin_value work?
Hey! Tell me, do I understand correctly what happens to the fastcgi_param PHP_ADMIN_VALUE values in the nginx - php-fpm bundle?
For example, we have this piece of config:
location = /a.php {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$uri;
fastcgi_param PHP_ADMIN_VALUE "open_basedir = $document_root:/test-$msec";
include fastcgi_params;
}
location = /b.php {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$uri;
include fastcgi_params;
}
<?php
echo ini_get('open_basedir');
Answer the question
In order to leave comments, you need to log in
fastcgi_param PHP_ADMIN_VALUE is set for a process before its lifetime expires, and such a parameter cannot then be overridden via ini_set, only via another PHP_ADMIN_VALUE.
Description of these directives is here https://www.php.net/manual/en/configuration.changes.php
Answering the question: yes, you will not encounter such behavior. But you need to remember that this setting will also propagate to other server sections if they have the same php-fpm handler installed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question