Bug #68024 [Fbk->NoF]: INI/ENV settings get prepended instead of appended

From: Date: Sun, 29 Jan 2017 04:22:56 +0000
Subject: Bug #68024 [Fbk->NoF]: INI/ENV settings get prepended instead of appended
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-207030@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68024&edit=1 ID: 68024 Updated by: php-bugs@lists.php.net Reported by: manuel-php at mausz dot at Summary: INI/ENV settings get prepended instead of appended -Status: Feedback +Status: No Feedback Type: Bug Package: FPM related PHP Version: Irrelevant Private report: N New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Re-Opened". Thank you. Previous Comments: ------------------------------------------------------------------------ [2017-01-15 07:15:04] krakjoe@php.net We are awaiting a new patch for supported version of PHP, as mentioned in the (closed) PR. ------------------------------------------------------------------------ [2014-10-09 01:54:55] datibbaw@php.net Thanks for the proposed patch, but abusing a doubly linked list is scary stuff, so I've opted to add a simple structure to keep track of both head and tail. ------------------------------------------------------------------------ [2014-09-16 08:59:22] manuel-php at mausz dot at The attached patch works around this by appending the setting at the end of the key-value list. I've modified the linked list so it's a circular double linked list with the exception that the tail is not linked to the head (but head to tail). This way appending is still fast and there are no changes to the traversals. An alternative approach would be to replace the list with a Zend HashTable. I can also create a pull request on GitHub if that's preferred. ------------------------------------------------------------------------ [2014-09-16 08:50:59] manuel-php at mausz dot at Description: ------------ During parsing the config FPM files FPM prepends new settings instead of appending (or replacing) them. This way it's impossible to override a previously defined setting. e.g. overriding a global setting with a pool specific. The only way this is possible is to define the setting before including global settings, which is somewhat unexpected behavior. Additional this behavior only applies to environment variables and INI settings. Test script: --------------- # cat fpm.d/test.conf [test] prefix = /var/www/$pool user = $pool pm = ondemand env[TMP] = foo env[TMP] = bar Expected result: ---------------- [16-Sep-2014 10:50:10] NOTICE: env[TMP] = foo [16-Sep-2014 10:50:10] NOTICE: env[TMP] = bar Actual result: -------------- [16-Sep-2014 10:50:10] NOTICE: env[TMP] = bar [16-Sep-2014 10:50:10] NOTICE: env[TMP] = foo ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=68024&edit=1

« previous php.bugs (#207030) next »