php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61867 user_ini_filename ignored for cached user_config
Submitted: 2012-04-27 16:41 UTC Modified: 2017-10-24 07:43 UTC
From: rainer-phpbugs at 7val dot com Assigned:
Status: Open Package: FPM related
PHP Version: 5.3.11 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rainer-phpbugs at 7val dot com
New email:
PHP Version: OS:

 

 [2012-04-27 16:41 UTC] rainer-phpbugs at 7val dot com
Description:
------------
I would like to use multiple different user.ini-Files in the same directory to modify some php.ini settings. I'm using Apache with mod_fastcgi, and therefore, as far as I can tell, I can't insert line breaks into variables with setenv, and teherefore I'm limited to at most one PHP_VALUE that I can define per vhost. This would be sufficient to set user_ini.filename to a suitable different file and set any values in there.

However, php_cgi_ini_activate_user_config() in sapi/fpm/fpm/fpm_main.c only evaluates the path, not the current value of user_ini_filename when retrieving cached entries. As a result, all requests hitting a given instance within the expiry period will receive the values valid for the user_ini.filename specified in the first request, which may or may not be the same as the one defined for the current request.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-04-27 17:46 UTC] rainer-phpbugs at 7val dot com
Another related issue is that PHP_VALUES passed via the fcgi-interface are also cached. If I set e.g. memory_limit to a different Value than the one specified in php.ini in one vhost via PHP_VALUE, the next request for an entirely different vhost that just happens to be processed by the same php-fpm child will receive this non-default value.
 [2012-05-23 13:29 UTC] fat@php.net
-Assigned To: +Assigned To: fat
 [2017-10-24 07:43 UTC] kalle@php.net
-Status: Assigned +Status: Open -Assigned To: fat +Assigned To:
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC