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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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:
 [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:(https://newglamourlifestyle.com)github.com
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Dec 04 09:01:30 2024 UTC