|  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
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:
Solve the problem:
46 + 16 = ?
Subscribe to this entry?

 [2012-04-27 16:41 UTC] rainer-phpbugs at 7val dot com
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.


Add a Patch

Pull Requests

Add a Pull Request


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]
-Assigned To: +Assigned To: fat
 [2017-10-24 07:43 UTC]
-Status: Assigned +Status: Open -Assigned To: fat +Assigned To:
 [2023-07-07 07:41 UTC] vishalgsacha at gmail dot com
New Glamour Lifestyle are sharing latest news about photography etc. More info to visit:(
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Feb 24 09:01:31 2024 UTC