Hi Hans

On Fri, Sep 12, 2025 at 11:21 PM Hans Krentel <hanskren...@yahoo.de> wrote:
>
> On Friday 12 September 2025 22:13:04 (+02:00), Soner Sayakci wrote:
>
>  > 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
> '"
>
> A warning is only a warning. You likely want to see it if the parameter is
> empty as it is *likely* unexpected.

An alternative might be to use a different sentinel for "ignore this
directive" might be "-". This way accidentally empty environment
variables keep warning, while intentionally set ones can skip the
directive. This works with the fallback syntax ${PHP_PROFILER:--}.

>  > 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
>
> Commented there with the long version + a small nitpick as your report is
> wrong for the directive and the extensions you reference above: Those are
> all Zend extensions, not just ordinariy extensions. However: If you provie
> a non-zero-length-string for an extension you get a much more enhanced
> diagnostic message about which files have tried. In your empty string case,
> not more files have been tried. So please feel free to add more rationale
> what kind of issue is causing you the warning.

I don't understand this paragraph.

Ilija

Reply via email to