Welcome! Log In Create A New Profile

Advanced

Re: интерпретация переменных внутри PHP VALUE и PHP ADMIN VALUE для PHP-FPM

July 15, 2011 06:59PM
> > geo $y {
> > default "${precision}+1";
> > }
>
> - with fastcgi_param PHP_VALUE "precision=$x";
> + with fastcgi_param PHP_VALUE "precision=$y";

I do not think PHP-FPM can perform inline mathematical evaluation within passed arguments to PHP_VALUE/PHP_ADMIN_VALUE. But it works for me when it comes to generic substitution of existing and defined in the master php.ini file configuration variables, with their actual values. In my experience, Maxim's suggestion works fine, and I could so far reference any variable I wanted in the PHP configuration file. This is very useful, for example, if you want to set security limits with open_basedir, but you also want to make sure that uploads work, but you don't want to hardcode the temporary upload folder into open_basedir, but rather read the current value from php.ini by adding ${upload_tmp_dir} to open_basedir value in the nginx configuration using fastcgi_pass PHP_ADMIN_VALUE:

geo $upload_tmp_dir {
default "${upload_tmp_dir}";
}
...
fastcgi_pass PHP_ADMIN_VALUE "open_basedir=$document_root:$upload_tmp_dir";

Anyway, it works for me.

Andrejs
Subject Author Posted

Re: интерпретация переменных внутри PHP VALUE и PHP ADMIN VALUE для PHP-FPM

Валентин Бартенев July 12, 2011 11:02AM

Re: интерпретация переменных внутри PHP VALUE и PHP ADMIN VALUE для PHP-FPM

locojohn July 12, 2011 11:58AM

Re: интерпретация переменных внутри PHP VALUE и PHP ADMIN VALUE для PHP-FPM

Maxim Dounin July 12, 2011 12:20PM

Re: интерпретация переменных внутри PHP VALUE и PHP ADMIN VALUE для PHP-FPM

Anonymous User July 12, 2011 12:38PM

Re: интерпретация переменных внутри PHP VALUE и PHP ADMIN VALUE для PHP-FPM

Anonymous User July 12, 2011 01:02PM

Re: интерпретация переменных внутри PHP VALUE и PHP ADMIN VALUE для PHP-FPM

Maxim Dounin July 12, 2011 01:54PM

Re: интерпретация переменных внутри PHP VALUE и PHP ADMIN VALUE для PHP-FPM

locojohn July 12, 2011 09:11PM

Re: интерпретация переменных внутри PHP VALUE и PHP ADMIN VALUE для PHP-FPM

Anonymous User July 13, 2011 12:16AM

Re: интерпретация переменных внутри PHP VALUE и PHP ADMIN VALUE для PHP-FPM

locojohn July 13, 2011 05:57AM

Re: интерпретация переменных внутри PHP VALUE и PHP ADMIN VALUE для PHP-FPM

António P. P. Almeida July 13, 2011 11:00AM

Re: интерпретация переменных внутри PHP VALUE и PHP ADMIN VALUE для PHP-FPM

locojohn July 13, 2011 12:12PM

Re: интерпретация переменных внутри PHP VALUE и PHP ADMIN VALUE для PHP-FPM

locojohn July 13, 2011 12:30PM

Re: интерпретация переменных внутри PHP VALUE и PHP ADMIN VALUE для PHP-FPM

António P. P. Almeida July 13, 2011 02:20PM

Re: интерпретация переменных внутри PHP VALUE и PHP ADMIN VALUE для PHP-FPM

António P. P. Almeida July 13, 2011 02:26PM

Re: интерпретация переменных внутри PHP VALUE и PHP ADMIN VALUE для PHP-FPM

locojohn July 15, 2011 06:59PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 249
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready