Answer the question
In order to leave comments, you need to log in
What might be causing PHP's strange behavior when changing parameters through Nginx?
It was necessary to change the config in php, but I did not want to restart it.
I decided to do everything through fastcgi_param php_admin_value, I did everything, continued to work, but noticed that the site began to fall off periodically with an error 500. The logs were empty, neither nginx nor php knew that something had fallen.
It turned out that the matter is in the line (I write from memory):
fascgi_param PHP_ADMIN_VALUE "pinba.enabled=0";
fascgi_param PHP_ADMIN_VALUE "open_base_dir=/var/www;pinba.enabled=0"
Answer the question
In order to leave comments, you need to log in
In fact, it turns out that you are passing the php-config string through fastcgi_param PHP_ADMIN_VALUE.
Therefore, one must adhere to its standard, and probably why everything after the semicolon was interpreted as a comment and "; pinba.enabled=0" was discarded. Try to experiment to replace ";\n " with "\n", I think it should work.
Also, wouldn't it be better/more convenient to split the php settings into two nginx settings?
fastcgi_param PHP_ADMIN_VALUE "open_base_dir=/var/www"
fastcgi_param PHP_ADMIN_VALUE "pinba.enabled=0"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question