Custom settings with PHP

locojohn nginx-forum at nginx.us
Sun Jul 10 02:59:02 MSD 2011


Igor Sysoev Wrote:
-------------------------------------------------------
> On Fri, Jun 18, 2010 at 08:23:16AM -0400, jbruni
> wrote:
> 
> > [b][color=#FF0000]UPDATE[/color][/b]
> > 
> > Now, it is possible to do this way:
> > 
> > [code]
> > fastcgi_param  PHP_VALUE 
> "upload_max_filesize=5M";
> > [/code]
> > 
> > More information here:
> > http://bugs.php.net/bug.php?id=51595
> > 

Igor, how about using the current values of PHP_INI* variables inside
the definition e.g.:

fastcgi_param PHP_ADMIN_VALUE
"open_basedir=/opt/www/mysite:${open_basedir}";

Currently, it doesn't work and nginx complains about the ${open_basedir}
variable, as the server treats it as nginx variable:

* Checking nginx' configuration ...
nginx: [emerg] unknown "open_basedir" variable
nginx: configuration file /etc/nginx/nginx.conf test failed

Any workaround for this or a hidden possibility to refer to current
values of PHP_INI variables?

Andrejs

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,22556,212048#msg-212048




More information about the nginx mailing list