Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128687 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 0C6291A00BC for ; Fri, 12 Sep 2025 20:13:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1757707911; bh=uT/JPtDh/FylIqmw4m5dBkwe9wK07+D8dnhhZoq4shs=; h=From:Date:Subject:To:From; b=dJ6OwAhJRTAggHj/6d5Yh66rKfUI2oCb2lT8roC7Hqu5ckiP90aULryIdLIk/ewkh zI4LYJ/uguzMFckAl2YRCM6iknvniTl3DYLVbO0DxfE2gFRI6KLFs10WYAQzPUcvZ+ nQUD6u16lwLlTUUIdDJpgSt0U6HeY73hxfJ9IYPLXtgcRIaU1XdJPL3GlzvrauWvYN xWmwODvzeuOUMCwpIaC28jwqggZ42jMhKT4Zu8FObJvzmo8SkAhs4b0pK7A43AYtj7 Rfb6b8AAE787bcXegN/3/pWwW5KKu/CPAXAb6CN/2WKWk9vvwcrtEPHQfU2PSXYKaj Kk2W6usCJ631Q== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id F25C8180341 for ; Fri, 12 Sep 2025 20:11:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) 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,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 12 Sep 2025 20:11:50 +0000 (UTC) Received: by mail-qt1-f175.google.com with SMTP id d75a77b69052e-4b5f7fe502dso12593031cf.0 for ; Fri, 12 Sep 2025 13:13:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1757707996; x=1758312796; darn=lists.php.net; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=uT/JPtDh/FylIqmw4m5dBkwe9wK07+D8dnhhZoq4shs=; b=Qc6NcjdghaHyCOzG5u6liaQHZdlBNA0GZKeZ3Jm5P3j+3ciNHlQ6pKBDc59xQpneB+ gmlmpwJxtD0OkWuDupIk7iILZiZqsjnCChHPLX7Laf6OQUprqjvGmn62DGl6zFlzVv1f 2hUgjSQ1pIJR4Es0fixCraBqp9mDF8jxlb12Y18xm2RLHljlc4z7hTU98o/ZZIp1Aiec eREo+NYIX49zxL5vPxzqmsBMmGdVWMaHiemCTfnQPS1Y68z6dKkc7oVA1htL3SlY8ztF 9z9hXaBiUnrtIrVgog1vFcmnfW9qpyvE4nmw2TMkin3CGiyPzp/17gZKWSw1tetFO+Uw QEgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757707996; x=1758312796; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=uT/JPtDh/FylIqmw4m5dBkwe9wK07+D8dnhhZoq4shs=; b=PlEy+J+4L0PfHgfbuRJMX38LUtKCxAHg4uRSJDdhPwWAN3Bgwjxv6v3bANQ54zCe4u wri6xfcTDbluuOhlxqpx7oKkW6YomqbWHJ9fuHedpcxj34kPLskw+bexHPw4hTYE7Dqw w+dCJaJ+YtO5SY0oZFb0hYPzk+iAIqXeFlUTWS6v5uC4G+cTp33S0ORHHg2JPunCU/6S TSs17wzDT/y+sMZglpFXkiZGCqW2+MYzNdywTq+OSL1GIdtiSTiQ8FSrZPvMoJoViYV4 E3TtsASHdqOmHTgwboy0yq8nifo1f2LxTY16vIIEtlsp6z9Y0tK1GWn2ccKj4PJRCi8b ECXw== X-Gm-Message-State: AOJu0YxHUr+3VVcO0U8r1WMbui8Rh2DUeFN7wQ+LC7+MRQXak0q/M6HU B6jEqDecq3VeuQaMk1vU+eU+UvdzbagEnxZOOXj025+M7rqlHgkVUQUNcBo8vkfuIRcgTXXr12e 35Ev7oSyRh4/rQB2V8Y5Depy2ZDVMQZXljAWVkKSWzw== X-Gm-Gg: ASbGnctZU8QZ06DTPHFupK8AFiFpFjRZydCwhMz+BACpOQxkct9acrZKWDbWbwqNc0T PzEjL3r0/PmZ9WM9GS9JQxZ+LnBGklxFjP91KW5amrtgcv5xDFo9etfYya/NCww1+JFbilM3Ctn YNEU/KUgRK7Wk9fLgFkPD9vv7fLPfZBQZMn7iszhbZ8OYGGX9pkfhWb3YEqP9QsdEIS37LMlYI2 xZeTLdlxGroyF9mWJps5lAQY2S0A4FkHYPPGEIkYeu8aT2u3AymnaJCKR+gZuvMoU5zBDADe2g8 HD+l7zUFddY0KWavWw== X-Google-Smtp-Source: AGHT+IFBtnRgeHvCxENraKpr5BL/srA3B8FifMLsqqF4Bfdh2c+t/7g0l7kf/bByhAlorcWVM3xZJlguGYmGYZsy54I= X-Received: by 2002:ac8:578e:0:b0:4b5:f432:c2ec with SMTP id d75a77b69052e-4b77d0f97a3mr65549181cf.77.1757707995784; Fri, 12 Sep 2025 13:13:15 -0700 (PDT) Precedence: list list-help: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Date: Fri, 12 Sep 2025 22:13:04 +0200 X-Gm-Features: Ac12FXygPhVES8IzdRefipS0yuzMvvBg38KlXo96Padhqp4umjp93vqNroChZEY Message-ID: Subject: [PHP-DEV] Environment Variable based PHP Extension loading To: internals@lists.php.net Content-Type: multipart/alternative; boundary="000000000000b52afe063ea04802" From: s.sayakci@gmail.com (Soner Sayakci) --000000000000b52afe063ea04802 Content-Type: text/plain; charset="UTF-8" Hey, I would like to load PHP extensions by environment variables in a containerized environment. All existing solutions are moving files in an entrypoint and this does not work for read-only containers. Why this? Extensions like Blackfire/XDebug/OpenTelemetry/Tideways do not like each to run at the same time, and having to build less containers simplifies a lot. It's already possible to use environment variables in the php.ini like so: extension=${PHP_PROFILER} So it's possible to toggle the extensions already, the only thing that is not working is passing an empty string (I don't want any profiler). Then we get warnings like: Warning: PHP Startup: Unable to load dynamic library '" Therefore I opened a pull request to ignore extension entries with empty strings, so this works with that case too. Looking for feedback in the pull request https://github.com/php/php-src/pull/19816 Thanks! --000000000000b52afe063ea04802 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hey,

I would like to load PHP extension= s by environment variables in a containerized environment. All existing sol= utions are moving files in an entrypoint and this does not work for read-on= ly containers. Why this? Extensions like Blackfire/XDebug/OpenTelemetry/Tid= eways do not like each to run at the same time, and having to build less co= ntainers simplifies a lot.

It's already possib= le to use environment variables in the php.ini like so:

extension=3D${PHP_PROFILER}

So it's poss= ible to toggle the extensions already, the only thing that is not working i= s passing an empty string (I don't want any profiler). Then we get warn= ings like: Warning: PHP Startup: Unable to load dynamic library '"=

Therefore I opened=C2=A0a pull request to ignore = extension entries with empty strings, so this works with that case too. Loo= king for feedback in the pull request=C2=A0https://github.com/php/php-src/pull= /19816

Thanks!
--000000000000b52afe063ea04802--