From: guix@twilken.net
To: 63877@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludo@gnu.org>, "Bruno Victal" <mirai@makinata.eu>
Subject: [bug#63877] Reworked patch for setting php-fpm environment variables
Date: Sun, 18 Feb 2024 00:21:44 +0100 [thread overview]
Message-ID: <20240217232151.12507-1-guix@twilken.net> (raw)
In-Reply-To: <7be3201e-af9b-4ad0-81d6-44ab316d2162@makinata.eu>
Hi Bruno, sorry for taking a while to get back to this.
Writing a test for curl's behaviour with the SSL_CERT_DIR variable proved too
fiddly for me, so I gave up and wrote a simpler test that just checks for a
sentinel variable in the phpinfo output instead.
I also found out that php-fpm clears environment variables when it starts,
except for those listed in its configuration. However, libcurl isn't affected
by this as far as I can tell -- it needs the SSL_CERT_DIR variable to be set
in the process environment, not only in the php-fpm config file!
I decided to set environment variables in the process environment and list
them in the generated configuration file, so they're passed through to any PHP
programs run through PHP-FPM. This should minimise surprise, I hope.
(That's also be useful for setting e.g. PATH -- Nextcloud has started
complaining that that variable is unset, and it needs the variable to be
listed in the php-fpm configuration.)
The reworked patch also removes some of the gexp-related hairyness -- the
`environment-variables' property just takes a list of (variable-name . value)
pairs now, no gexp'ing required, though file-like objects like what
`file-append' returns are accepted.
Please let me know what you think, and thank you for your considerable
patience with this patch series! :)
next prev parent reply other threads:[~2024-02-17 23:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-03 18:25 [bug#63877] [PATCH] gnu: services: web: Set SSL_CERT_DIR in php-fpm environment Timo Wilken
2023-06-03 22:18 ` Bruno Victal
2023-06-04 13:59 ` [bug#63877] [PATCH v2] gnu: services: web: Allow specifying extra php-fpm environment variables Timo Wilken
2023-06-05 3:44 ` Bruno Victal
2023-07-01 14:40 ` [bug#63877] [PATCH] gnu: services: web: Set SSL_CERT_DIR in php-fpm environment Ludovic Courtès
2023-10-15 20:54 ` [bug#63877] [PATCH v2] gnu: services: web: Allow specifying extra php-fpm environment variables Timo Wilken
2023-10-19 14:32 ` Bruno Victal
2024-02-17 23:21 ` guix [this message]
2024-02-17 23:21 ` [bug#63877] [PATCH 1/2] " guix
2024-02-17 23:21 ` [bug#63877] [PATCH 2/2] tests: web: Test environment variables are set for php-fpm guix
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240217232151.12507-1-guix@twilken.net \
--to=guix@twilken.net \
--cc=63877@debbugs.gnu.org \
--cc=ludo@gnu.org \
--cc=mirai@makinata.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).