php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #54824 different php.ini Paths for Pools
Submitted: 2011-05-18 13:41 UTC Modified: 2011-10-08 14:20 UTC
Votes:4
Avg. Score:4.0 ± 1.0
Reproduced:4 of 4 (100.0%)
Same Version:1 (25.0%)
Same OS:3 (75.0%)
From: dbetz at df dot eu Assigned: fat (profile)
Status: Wont fix Package: FPM related
PHP Version: 5.3.6 OS: Any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
31 + 33 = ?
Subscribe to this entry?

 
 [2011-05-18 13:41 UTC] dbetz at df dot eu
Description:
------------
Hello,

currently there is no availability to add additional php.ini files per pool.

It would be nice to set an PHPiniDir/PHPRC per pool in php-fpm.conf or that fpm reads and works with env['PHPRC'] defined in pool configuration.








Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-07-02 11:30 UTC] fat@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: fat
 [2011-07-05 18:04 UTC] fat@php.net
-Status: Assigned +Status: Suspended
 [2011-07-05 18:04 UTC] fat@php.net
It's not possible to make this easily.

In fact php.ini files are read at FPM startup (it's also true for other sapi). 
When children are forked, the ini reading has already been made. That's why you 
can specify ini options throught the php(_admin)?_value directive.

I keep this in mind to try to find an easy and elegant solution.
 [2011-10-08 14:20 UTC] fat@php.net
-Status: Suspended +Status: Wont fix
 [2011-10-08 14:20 UTC] fat@php.net
Sorry, this is not possible to do this.

The only way is to start different FPM instances.
 [2016-06-14 08:27 UTC] anrdaemon at freemail dot ru
I would like to revive this thread, since it seems that there was some misunderstanding.

It is apparent that commenters assumed that the INI file specified in the pool configuration file would be read each time the child starts.
But as the life goes, this is not needed.

It is perfectly acceptable for INI file to be read by the FPM manager, the point of per-pool ini file is to let users configure their PHP instances without the need to touch pool configuration.

It is possible to make use of the user ini files (the next available measure to configure FPM), but the use of them isn't desirable in many cases.

From security standpoint, since pool configuration takes precedence over INI file, I consider such behavior "safe enough" to delegate editing of php.ini file to the site owner.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 10:01:28 2024 UTC