Edit report at https://bugs.php.net/bug.php?id=51595&edit=1
ID: 51595
Comment by: glen at delfi dot ee
Reported by: fat@php.net
Summary: passing ini settings via FASTCGI parameters
Status: Closed
Type: Feature/Change Request
Package: FPM related
Operating System: any
PHP Version: trunk
Assigned To: fat
Block user comment: N
Private report: N
New Comment:
It is possible to pass variables in lighttpd 1.4:
setenv.add-environment += ( "PHP_VALUE" => "
user_agent=\"ff\"
user_ini.filename=\".php.user.ini\"
memory_limit=\"500M\"
"
)
you need to use raw newlines to separate values and of course escape quotes for lighttpd config
parser
Previous Comments:
------------------------------------------------------------------------
[2013-09-09 02:20:45] moswh07 at gmail dot com
I've been got the same problem, which I get
$_SERVER["PHP_VALUE"] = '...'
in php.ini when I use
fastcgi_param PHP_ADMIN_VALUE ...
in nginx config.
I find the solution that spawn-cgi may not support this feature.
the newest updated of spawn is 1.6.3 which was published in 2009-09-23.
but we can see from this page that the feature was added in 2010-04-19 and only
supported in php-fpm.
------------------------------------------------------------------------
[2013-07-23 17:57:37] ben at indietorrent dot org
I, too, have noticed that PHP configuration directives that are defined like
this, within an nginx "location{}" block
fastcgi_param PHP_VALUE "
error_reporting=6143
log_errors=On
";
are not effective. The values are propagated to the effective environment
variables, though, as evidenced by the fact that the values appear in the
$_SERVER["PHP_VALUE"] superglobal.
Will this ever work? Or is it simply not possible to achieve this with PHP's CGI
executable (instead of, for example, php-fpm)?
------------------------------------------------------------------------
[2011-10-24 14:06:56] info at breakdev dot com
it doesn't work with nginx anf php5-cgi spawn:
nginx version: nginx/0.7.67
PHP 5.3.8-1~dotdeb.1 with Suhosin-Patch (cli) (built: Aug 26 2011 12:46:54)
I used this line in the nginx.conf:
fastcgi_param PHP_ADMIN_VALUE open_basedir=/home/www/docs
so there was set
$_SERVER['PHP_ADMIN_VALUE']="open_basedir=/home/www/docs"
------------------------------------------------------------------------
[2011-08-21 18:06:17] fat@php.net
Yes it's been integrated into FPM since 5.3.3 I think. In all the cases, it works
with php 5.3.7
------------------------------------------------------------------------
[2011-08-21 17:40:43] ywarnier at beeznest dot org
Hi guys, has this been sent to any stable release of PHP? I can't find it in any part of http://www.php.net/ChangeLog-5.php#5.3.7
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=51595--
Edit this bug report at https://bugs.php.net/bug.php?id=51595&edit=1