php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69851 Can't set env[] variables in php-fpm.conf to String "yes" or "no"
Submitted: 2015-06-16 16:53 UTC Modified: 2015-07-22 12:31 UTC
From: rainer-phpbugs at 7val dot com Assigned:
Status: Not a bug Package: FPM related
PHP Version: 5.6.10 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: rainer-phpbugs at 7val dot com
New email:
PHP Version: OS:

 

 [2015-06-16 16:53 UTC] rainer-phpbugs at 7val dot com
Description:
------------
Setting  

env[NSS_SDB_USE_CACHE] = no 

in php-fpm.conf results in a startup error

ERROR: [.../php-fpm.conf:365] empty value

and php-fpm fails to start. The same behaviour is shown for "false" instead of "no".

Setting  

env[NSS_SDB_USE_CACHE] = yes

in php-fpm.conf shows in phpinfo() as 

_ENV["NSS_SDB_USE_CACHE"] 1

instead of the expected "yes". "true" has identical results. Other arbitrary strings, such as "foo" show up unchanged in $_ENV.

Expected result:
----------------
One should be able to assign arbitrary values to environment variables including "yes", "no", "false" or "true". 

Unless security considerations prevent it, allowable values should include whitespace (including leading and trailing), including line breaks.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-06-17 09:08 UTC] rainer-phpbugs at 7val dot com
Apparently, it's necessary to quote the values for env[], i.e.

env[NSS_SDB_USE_CACHE] = "no" 

does not convert the string to an empty value and leaves a literal 'no' without the quotes in the environment variable.
 [2015-07-22 12:31 UTC] mike@php.net
-Status: Open +Status: Not a bug
 [2015-07-22 12:31 UTC] mike@php.net
Usually yes, no, on, off, true and false have special meaning in config files.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 09:01:28 2024 UTC