Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 559116

Summary: =dev-lang/php-5* : php-fpm.conf is outdated
Product: Gentoo Linux Reporter: julgo <4julgo>
Component: [OLD] DevelopmentAssignee: PHP Bugs <php-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch for dev-lang/php:5.5 and dev-lang/php:5.6 ebuilds
Patch for sapi/fpm/php-fpm.conf.in
New version of ebuild patch
New version of php-fpm.conf.in patch
New version of php-fpm.conf.in patch

Description julgo 2015-08-29 18:08:25 UTC
/etc/php/fpm-php5.?/php-fpm.conf is outdated

Reproducible: Always
Comment 1 julgo 2015-08-29 18:10:59 UTC
Created attachment 410576 [details, diff]
Patch for dev-lang/php:5.5 and dev-lang/php:5.6 ebuilds

Tested on dev-lang/php-5.5.28 and dev-lang/php-5.6.12
Comment 2 julgo 2015-08-29 18:14:12 UTC
Created attachment 410578 [details, diff]
Patch for sapi/fpm/php-fpm.conf.in

Tested on dev-lang/php-5.5.28 and dev-lang/php-5.6.12
Comment 3 julgo 2015-08-30 10:18:11 UTC
Created attachment 410590 [details, diff]
New version of ebuild patch

I think, replace @SLOT@ after user patches, will be better
Comment 4 julgo 2015-08-30 22:05:22 UTC
Created attachment 410656 [details, diff]
New version of php-fpm.conf.in patch

Include additional config files after default value allow override them
Comment 5 julgo 2015-09-05 11:16:42 UTC
Created attachment 411052 [details, diff]
New version of php-fpm.conf.in patch

Recreate patch with "diff -u" instead "git diff"
Comment 6 Michael Orlitzky gentoo-dev 2015-11-19 02:12:39 UTC
I just looked into this, and I don't see a good reason to ship a modified copy of php-fpm.conf. Only a few things were changed from the default one back in php-5.3:

  1. Some max_children, start_servers, etc. settings were twiddled.

     The correctness of this depends on your system, and there's
     no reason to think the messed-with values are better than the
     defaults.


  2. The user/group settings were uncommented, but set to the default
     values.

     This one doesn't do anything at all.


  3. Error log enabled (to /var/log/php-fpm.log) by default.

     Personal preference.


  4. A warning added to the pidfile setting.

     I see the value in this, but if it works out-of-the-box, why
     would someone try to mess with it? If someone does that we can
     just tell them not do. Or sed this whole mess out of the file
     before anyone sees it.


  5. The commented include_dir setting was pointed at some place you
     might have liked it to be back in php-5.3.

     Again, kinda nice back in 5.3, but totally wrong now. If you
     really need some extra configuration you can figure out where
     to point this. This alone isn't worth the extra work.


I'm going to try a version with the default php-fpm.conf and see what happens.
Comment 7 Michael Orlitzky gentoo-dev 2015-11-23 16:38:56 UTC
This is fixed in

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=faa43f444ebc363689ea5d0e3c8068540548f541

In the 5.6.x series, I've done the simplest thing possible and shipped the upstream php-fpm.conf as-is. This works out of the box, and if you need to use some other configuration like include files or logging you'll have to comment that stuff.

In php-7, upstream has split the FPM config, so I did actually take the suggestion from your patch and make the include line,

  include=/etc/php/fpm-php7.0/fpm.d/*.conf

I then installed the "www.conf" from the tarball into that location.

From now on -- at least in the 5.6.x and 7.x series -- the FPM config should stay up-to-date. Thanks for the report and the patch!