Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111198 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 5383 invoked from network); 27 Jul 2020 06:22:43 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 27 Jul 2020 06:22:43 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2A66B1804E6 for ; Sun, 26 Jul 2020 22:18:18 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-oi1-f169.google.com (mail-oi1-f169.google.com [209.85.167.169]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sun, 26 Jul 2020 22:18:17 -0700 (PDT) Received: by mail-oi1-f169.google.com with SMTP id k4so13330948oik.2 for ; Sun, 26 Jul 2020 22:18:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=D1QVLVOGRgw9qrXcUFVc7A/w72hSlQct2WzQbQv1nkw=; b=HKG2aYbIAIJ3qtog4OPHdCEsGX9dpkaq4stmpOcUvSrlXDyy2nMhwpl0GAoK3qJk3R LXy3GutHDFF9pgsfGBCxeLVHK7x/jfk/kvv93hK6OaijTiMvtiBa4WWMHq/uUKtmCT1e YbqlQtaOhVXjoshhg+Jqnm9deLANjV09dmNbjUJPPUz4j8S8CflLZs7T6ayMLr0aA1lP tWr48RXtsVr1hRv2nb5UzUp3oUh9igu63om/BXNqv9dHu6UIUpvqPehfNyALLM70atnp 6wTCazjSCloA3OJlVmh8GIzkE5nixJ86F7XOdBPfaXjuZcC6fy+OPtakAPIGQz4bRpqL H7vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=D1QVLVOGRgw9qrXcUFVc7A/w72hSlQct2WzQbQv1nkw=; b=ZvQDLqbm3JDdeirTqzrpBz2XgoPFpBuSb/rtxGdx/+JzlMOzZMT+vSdgzlzqcG2a8a OBBasbCMKpDUctpdjUfJ/W6vW9SJy9HbfkN4QASDP16+Zfp073pEC1k6zJY/YIwWKOa5 5iEqIFgqKHBtz1rFYc0MnUvFh/3do0hsTan+jz7G7hjta2DM+qxGAPgfSTStUowJizZH R1A4w8Xou+IUndOqh2XsEA/xZhbuy57VldOftlaIlfpGJRIsBb9XbK7vZjH9xku3s781 iLMhcTN+MQhleypX3MsrZUA3NOz5dcty/WFl09Uq3PUNX49NK8DhQIZeYnCR4VGQFWaN 8D4Q== X-Gm-Message-State: AOAM5331AMEoClNEk/yzrDe5GlyfpDUIpJfIBWtfuJ5iH+OEQjAuGFRX WivcPUSCu+YPNXpxCvgVxByX7yJXi7vAoQGC6Ng= X-Google-Smtp-Source: ABdhPJzhztoIKTvEcVVRllVUlQHpHfC9C+/qrCiaD3kRXLpefxojmymOiaXMgtDJxAMPogKF1HuAXWlZ/vSy6Zy3pAo= X-Received: by 2002:aca:4ec1:: with SMTP id c184mr17377743oib.112.1595827094807; Sun, 26 Jul 2020 22:18:14 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 27 Jul 2020 07:18:02 +0200 Message-ID: To: Michael Morris Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000001be82605ab6573b1" Subject: Re: [PHP-DEV] Proposal: php.ini environment variable fallback value From: michal.brzuchalski@gmail.com (=?UTF-8?Q?Micha=C5=82_Marcin_Brzuchalski?=) --0000000000001be82605ab6573b1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Michael, niedz., 26 lip 2020, 06:22 u=C5=BCytkownik Michael Morris napisa=C5=82: > PHP's ini values are already a bit of a mess. You have a global php.ini > file, and then most PHP ini directives can be set per directory using the > .htaccess file. About a third can be set at runtime. This makes tracking > down where a setting came from a bit of a headache unless care is taken. > This proposal promises to make the situation even more complicated. > > Also, what would this solve that using .htaccess files to override the > default values not solve aside from the rare settings that cannot be set > per directory? > Bear in mind that .htaccess has a very narrow use and it's kind oh thing Apache2 related and not PHP specific! Personally I like the idea of setting ini directives via environment variables but not by a complex syntax in ini files but rather by looking up for a directive by environment variable name and setting it up directly for instance: PHP_MEMORY_LIMIT=3D1G php script.php Being equivalent of: php -dmemory_limit=3D1G script.php This would allow to avoid changes in php.ini file in containers with php or php-fpm like Docker ones and to adjust ini directive values by simple environment variables. I believe there should be no two ini directives which could be ambiguous like for eg. "memory_limit" and "memory.limit" and cause issues on ini directives lookup by env variable name like PHP_MEMORY_LIMIT. Cheers, Micha=C5=82 Marcin Brzuchalski > --0000000000001be82605ab6573b1--