php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75848 Can not start php7.2-fpm because 'clear_env' is an unkown entry
Submitted: 2018-01-19 13:38 UTC Modified: 2018-05-05 21:53 UTC
Votes:7
Avg. Score:4.3 ± 0.9
Reproduced:6 of 6 (100.0%)
Same Version:4 (66.7%)
Same OS:1 (16.7%)
From: gifsucher at hotmail dot de Assigned:
Status: No Feedback Package: FPM related
PHP Version: 7.2.1 OS: Debian 9 (Stretch)
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2018-01-19 13:38 UTC] gifsucher at hotmail dot de
Description:
------------
I use Debian 9 (Stretch) with latest nginx and php7.2 fpm which is all configured well.

Now I want to use nextcloud but this want access to 'env[PATH]' which isn't working over PHP 'getenv(PATH)' so it errors out.

I found in http://php.net/manual/en/install.fpm.configuration.php the value "clear_env" which is set by default to true/yes so I added it in php-fpm.conf and are getting now "unkkown entry 'clear_env'".

I used before sysvinit-core and replaced it with systemd-sysv because of "Thanks for the report. Well, unfortunately php-fpm without systemd support doesn't recognise this configuration option." But I could not found the related bug to this.

I hope that someone can lookup for this and tell me what went wrong or if this is now a bug in 7.2.1 fpm.

Expected result:
----------------
PHP 7.2 FPM runs after adding 'clear_env = no'

Actual result:
--------------
[....] Starting php7.2-fpm (via systemctl): php7.2-fpm.serviceJob for php7.2-fpm.service failed because the control process exited with error code.
See "systemctl status php7.2-fpm.service" and "journalctl -xe" for details.
 failed!

root@host /etc/init.d # systemctl status php7.2-fpm.service
● php7.2-fpm.service - The PHP 7.2 FastCGI Process Manager
   Loaded: loaded (/lib/systemd/system/php7.2-fpm.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2018-01-19 14:34:48 CET; 1min 23s ago
     Docs: man:php-fpm7.2(8)
  Process: 6779 ExecStart=/usr/sbin/php-fpm7.2 --nodaemonize --fpm-config /etc/php/7.2/fpm/php-fpm.conf (code=exited, status=78)
 Main PID: 6779 (code=exited, status=78)

Jan 19 14:34:48 host systemd[1]: Starting The PHP 7.2 FastCGI Process Manager...
Jan 19 14:34:48 host php-fpm7.2[6779]: [19-Jan-2018 14:34:48] ERROR: [/etc/php/7.2/fpm/php-fpm.conf:109] unknown entry 'clear_env'
Jan 19 14:34:48 host php-fpm7.2[6779]: [19-Jan-2018 14:34:48] ERROR: failed to load configuration file '/etc/php/7.2/fpm/php-fpm.conf'
Jan 19 14:34:48 host php-fpm7.2[6779]: [19-Jan-2018 14:34:48] ERROR: FPM initialization failed
Jan 19 14:34:48 host systemd[1]: php7.2-fpm.service: Main process exited, code=exited, status=78/n/a
Jan 19 14:34:48 host systemd[1]: Failed to start The PHP 7.2 FastCGI Process Manager.
Jan 19 14:34:48 host systemd[1]: php7.2-fpm.service: Unit entered failed state.
Jan 19 14:34:48 host systemd[1]: php7.2-fpm.service: Failed with result 'exit-code'.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-01-19 13:44 UTC] requinix@php.net
-Status: Open +Status: Feedback
 [2018-01-19 13:44 UTC] requinix@php.net
clear_env is a pool setting, meaning it has to be a pool section - like a [www]. Is that where you put it? What is your php-fpm.conf?
 [2018-05-05 21:53 UTC] requinix@php.net
-Status: Feedback +Status: No Feedback
 [2019-09-29 05:54 UTC] southtowntn at yahoo dot com
Alpine Linux PHP 7.3.8

When adding clear_env = no to pool config 

ERROR: [/etc/php7/php-fpm.d/www2.conf:2] unknown entry 'clear_env'
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 11:01:28 2024 UTC