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!

Reply via email to